assign(...) uses the updated primary key in the where clause rather than the original key #3184
Unanswered
rat-matheson
asked this question in
Q&A
Replies: 1 comment 4 replies
-
I think that's a wontfix, you will need to use a QB for such things. We dont really support changing PKs, PK is what forms the identity key, if you would change it, things will break anyway. Changing PKs is an antipatter if you ask me. edit: Btw its not about |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
When I update the primary key of an entity, the generated query uses the updated key in the where clause rather than the original key
To Reproduce
Steps to reproduce the behavior:
(see example in additional context)
Expected behavior
The original key should be used
Additional context
Generated query
Expected query
I set up an event listener to see what is actually getting passed to the query generator
beforeUpdate
afterUpdate
Versions
Beta Was this translation helpful? Give feedback.
All reactions