我有嵌入式文档的user架构:MongooseJSphotosPhotoSchema
var UserSchema = new Schema({
email : { type : String, index : 'unique', set: toLower }
, login : { type : String, index : 'unique' }
, password : { type : String }
, salt : { type : String }
, photos : [ PhotoSchema ]
, name : { type : String }
});
当我检索一个user时,如何限制photos结果集中的数量?
或者我应该检索用户拥有的所有照片(即使有一百万张)?