我有这样的收集mongodb:
var CategorySchema = new mongoose.Schema({
Name: String,
Description: String,
Picture: {
type: String,
default: 'http://placehold.it/64x64'},
Level: {
type: Number,
default: 1},
Owner:{
type: Schema.ObjectId,
ref: 'Category'}
});
如何使用Owner
获取结果,因为api只能通过_id
获得结果。