Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
instance.set('id', 1) returns undefined #4702
Seems like setting a value of a field that is a primary key returns
Foo .findOne() .then( (foo) -> foo.set('id', 100).save() )
Note: It actually doesn't matter if the field name is
I'm using v. 3.12.0 with
Looks like we have a bunch of return paths that simply
That's a good point.
In this case
I would say it is an improvement, but can lead to very subtle bugs. Ultimately we should have some mechanism to notify the application code about a failure to set given field. Do you think throwing is an option for v. 4.x?