Closed Fabs closed 9 years ago
You're right, thanks for the catch
Also, when I fixed that, I started getting MongoError: Modifiers and non-modifiers cannot be mixed.
I think maybe the full correction would be: this._collection.upsert(this._id, {$set: this});
I don't realy get why this, maybe it has something to do with how it uses $setOnInsert internally?
Yes, I've actually changed this to an update now. It makes sense as it's doing an insert when there isn't an _id
Nice, thanks.
There was, I believe, a typo on the this.collection when you tried to save a model that had previously received an _id.