Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop to update automatically #192

Open
brunogonncalves opened this issue Aug 5, 2016 · 0 comments
Open

Stop to update automatically #192

brunogonncalves opened this issue Aug 5, 2016 · 0 comments

Comments

@brunogonncalves
Copy link

I have a problem, I want to save my entity if user submit the form clicking in a button, but when I set some value in entity object, my register is updated in my database !

entityObject.all().list(function(registers){

  var myRegister = registers[0];

  // myRegister is updated in my database
  myRegister.someValue = 'value';


  // I want to update this register just if user click to submit a for like this
  function clickEvent(){
    persistence.add(myRegister);
    persistence.flush(function(){
      // the register has been saved !
    });
  }

});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant