upsert isn't work correctly
Current upsert method contains the following code:
if (check.length > 0) {
.. do update...
}
else {
.. do insert...
}
But 'check' variable is an object, not an array, contained 'items' property within self with length property. May be there are cases when that statement isn't true, but currently 'upsert' is broken.
the value of checkis returned by this.where that always returns a List, check where implementation at list.coffee or list.js
All is good in list.js Things bad in collection.js, where check variable is assigned to a List, but in "if" statments it is evaluated not on check.items.length, but on check.length itself.
You're right :+1: gonna fix this one ;)