This might be a very simple question but I don't find anything about it in the Waterline docs.
How is it possible to get an instance of a Waterline model without immediately saving it.
Model.create(data); // already written to database
I am looking for something like
var user = User.new(data); // new instance, not persistent so far
user.doSomething(withThis); // call method on instance
user.save(); // Now write it to database
Thanks
Looks like you can utilize basic javascript instantiation. Check out this issue not sure if it has been fixed but you can follow the crumbs from there.
https://github.com/balderdashy/waterline/issues/763
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With