angular-fullstack:关于generator-angular-fullstack中的多个集合

时间:2016-03-13 17:15:38

标签: angularjs node.js mongodb api angular-fullstack

我有这样的收集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获得结果。

0 个答案:

没有答案