You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
sergproua
changed the title
findAll returns empty array on a first call when using LocalStorageDS
findAll returns empty array on a first call when using DSLocalStorageAdapter
Nov 9, 2014
You actually found a bug in the update method of the DSLocalStorageAdapter, which I will fix.
The reason this is happening is that the upsert option for DS.create defaults to true, which means that if you include a primary key in the attributes that you pass to DS.create, it will instead try to update the existing item that has that primary key.
Change your jsfiddle example to either use upsert: false or not provide primary keys, and it should work fine. If you don't provide primary keys then guids will be created for you.
Parent.findAll returns empty array on a first call. It only happens when resource has relationships defined. I'm using DSLocalStorageAdapter.
http://jsfiddle.net/2dwyh7qr/3/
The text was updated successfully, but these errors were encountered: