mongoose
node.jsいじってます。 さらっと備忘録 mongoose.Schema.Types.ObjectId ObjectIdの比較は===ではダメ、anObjectId.equals(anotherObjectId)を使う Array.indexOf(obj) // mongooseのモデル var FooSchema = new Schema( {bars: [{type: ObjectId, ref: hoge…
node.jsいじってます。 さらっと備忘録 mongoose.Schema.Types.ObjectId ObjectIdの比較は===ではダメ、anObjectId.equals(anotherObjectId)を使う Array.indexOf(obj) // mongooseのモデル var FooSchema = new Schema( {bars: [{type: ObjectId, ref: hoge…