graffiti-mongoose
graffiti-mongoose copied to clipboard
Inverse references
If I have two schemas like this:
var personSchema = Schema({
name : String,
age : Number,
});
var storySchema = Schema({
_creator : { type: Schema.Types.ObjectId, ref: 'Person' },
title : String,
fans : [{ type: Schema.Types.ObjectId, ref: 'Person' }]
});
It would be nice to be able to add a connection from person to stories that results in Story.find({_creator:...})
related to #64
+1!