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
If you try to pass property with undefined value to .merge method, it actually updates the column value. It should skip the column instead.
classUserextendsBaseModel{
@column()declareid: number
@column()declareusername: string|null
@column()declareemail: string}constuser=newUser().merge({username: 'test',email: '[email protected]',})// you might receive an object from validator or other source, where object has property, but with undefined value// which is valid type as merge accepts Partial<>, but any column itself can't have undefined valueuser.merge({username: 'test2',email: undefined,// this value will be actually set})user.email// undefined
Reproduction repo
No response
The text was updated successfully, but these errors were encountered:
Package version
21.4.0
Describe the bug
If you try to pass property with
undefined
value to.merge
method, it actually updates the column value. It should skip the column instead.Reproduction repo
No response
The text was updated successfully, but these errors were encountered: