coresmart / persistencejs

persistence.js is an asynchronous Javascript database mapper library. You can use it in the browser, as well on the server (and you can share data models between them).
http://persistencejs.org
1.73k stars 240 forks source link

Entity.syncAll() - group is undefined #146

Open Chofoteddy opened 10 years ago

Chofoteddy commented 10 years ago

Issue: 115 - https://github.com/zefhemel/persistencejs/issues/115

@miklschmidt:

This commit (2499ad540946e6e160f229a41215c5e3d0cf77c6) broke the sync adapter. group is undefined. Furthermore, existingItems.concat returns the concat'ed array it doesn't modify the one given. So it should be existingItems = existingItems.concat.... The current code doesn't work. Let me know if you want a PR to fix it.

crico commented 10 years ago

The variable "group" is actually "groupedIds", is it right?

BredStik commented 9 years ago

+1 Had to fix this as well to make it work.

juppwerner commented 8 years ago

I think the new lines 182 - 186 in lib/persistence.sync.js which were introduced by the commit 2499ad5 can be removed again, as there is no evidence that the created idVals array is ever used.