mongodb - mongoose how to query multiple models
欧阳克
欧阳克 2017-06-20 10:05:55
0
4
949

for example

aModel = {
    user_id: String,
    file_name: String,
    page_id: Number
}
fileSchema = new Schema({
    page_id: Number,
    key: String,
    doc: String,
    title: String,
    sym: String
});

bModel = {
    user_id: String,
    file_name: String,
    origin_file: String,
    new_file: [fileSchema]
}

It is known that user_id, file_name, page_id and model are asynchronous. How to search these two models at the same time?
Go to the next step after getting two results

欧阳克
欧阳克

温故而知新,可以为师矣。 博客:www.ouyangke.com

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!