javascript - Ember Data LocalStorage Adapter find always rejected -
i using ember info beta 11 localstorage adapter version 0.4.0 ( tested 0.3.2), when seek find method goes rejection when utilize query.
ex: works
this.store.find('segment');
but not work , returns rejected promise reason set undefined
this.store.find('segment',{locked:false});
what reason ?
edit
apparently first reply wasn't right one, cleared things bit, in ember when create record, not saved localstorage
, cached in store, when perform find, find nil because storage did not store anything, need save record.
like so
var record = this.store.createrecord("model",hash); record.save();
i wasn't doing record.save()
main cause of problem.
for more info see ember:persisting records
javascript ember.js ember-data local-storage
No comments:
Post a Comment