You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It throws TypeError: Cannot read property 'save' of undefined. Instead of this I would expect a meaningful error to be thrown when I try to save the instance.
Note: It actually doesn't matter if the field name is id or what it's type is. The fact that it is a primary key is relevant.
I'm using v. 3.12.0 with sqlite dialect.
The text was updated successfully, but these errors were encountered:
throw would be breaking BC, so a major bump.
A few of the returns are safety valves, so they could throw, one or two are just convenience.
In any case for now they should probably all be changed to return this.
In this case return this would result in just silently ignoring the set operation, right?
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?
Seems like setting a value of a field that is a primary key returns
undefined
. Consider this snippet:It throws
TypeError: Cannot read property 'save' of undefined
. Instead of this I would expect a meaningful error to be thrown when I try to save the instance.Note: It actually doesn't matter if the field name is
id
or what it's type is. The fact that it is a primary key is relevant.I'm using v. 3.12.0 with
sqlite
dialect.The text was updated successfully, but these errors were encountered: