authentication - Ember Data Save method, Create vs update -


I do not know how Eber determines whether it should be updated or recorded, based on ID or store listing , But the code example looks like something else:

  // This gives the user a call without the currentUser.get ('store') call. ('User_detail', '49') / / This returns 49 currentUser.get ('id') / / This returns the correct currentUser.get ('store'). Here's a lead, but not currently, to change / update issues created in this API / user. 48 Current Users Toting () // & lt; EmberApp.UserDetail: ember461: 48 & gt; // It looks like the current status is included here http:// http://checkonline.com/en/data/classes/DS.RootState.html currentUser.currentState // Return Root.loaded.edited.edicated currentUser.get (' CurrentState .The name of the state '); // This is also true and true currentUser.get ('isNew');   

Tell me why I have this problem in my app is the current user. If you logout, then I update the current user so I set up Ember.currentUser.setProperties (newUserData) Have done I update the current user object so that AMR will automatically trigger updates in my app. If I replace the currentUser Ember.currentUser = newUser; Nothing will be updated if I can not solve the above problem, an alternative solution will also work for swapping user objects.

In this way I handle the global user state

  container.register ('user: current', amber quarantine user); // and Ember.currentUser.setProperties () handle updates via application.inject ('controller', 'user', 'user: on'); Application.inject ('route', 'user', 'user: on');   

An appropriate solution will replace Ember.currentUser, although doing so does not trigger the update.

isnew and isDirty in a new model The property will be set to true, the existing record will need to be updated which only set to isDirty .

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -