@Key Fields #611
@Key Fields
#611
Replies: 2 comments
-
There is a member function |
Beta Was this translation helpful? Give feedback.
0 replies
-
Try Save function has a function |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What is the right way to update 1+ rows that all share a same value. e.g.
update user set status='VERIFIED' where kycStatus='VERIFIED'
. If I use update, I'd have something like this:I want to use update() instead of createUpdate() because I have beforeSave() interceptors I need to run. If I flag kycStatus as a
@Key
field, I get the errorcannot guarantee uniqueness under that path, do you forget to add unique constraint for that key?
This leads me to believe that@Key
fields must be unique, but in this case it is not.How can I achieve this update? I did just read about
setKeyProps()
but I'm not sure if that would work (and doesn't seem to be in the version I'm using so I can't test it).Thanks...
Beta Was this translation helpful? Give feedback.
All reactions