2
votes

im using LSA as my application adapter. im trying to update a model but i get an error that say

Uncaught TypeError: Cannot call method 'lookup' of undefined ember-data.js:231

i have a controller and in actions of controller i write these codes :

 al:function(id){
        console.log(this.store.find('axisModel'));
        this.store.find('axisModel',id).then(function(item){
            item.set('orderId','1000');
            item.save();
            //console.log(item);
        });
    },

i have access to store and store can find a record and when i set orderId it set on ui but when i try item.save() for saving in localstorage i get an error.my ember-data verison is v1.0.0-beta.1-39-g80dcf42 and ember version is v1.0.0 . if i comment item.save() the ui was update but the model in local storage dosent update and if i uncomment this i get an error .

Update

i update the ember.js and ember-data to canary version and now every thing work correctly

1
Would you please move your Update into an Answer and accept it so this question doesn't show up as unanswered? - gerry3

1 Answers

1
votes

Update

i update the ember.js and ember-data to canary version and now every thing work correctly