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
Describe the bug
I have an entity whose primary key includes a composite foreign key. I can't update it. The generated sql appears to be wrong. This is a pretty common scenario for me since I am using partitioned tables.
Stack trace
N/A - there is no error but here is the generated (formatted) query:
As you can see, the where is looking for "program_id", "program_organization_id" but the inner select returns "site_id", "program_id" (I translated them). So it never matches and updates 0 rows.
Describe the bug
I have an entity whose primary key includes a composite foreign key. I can't update it. The generated sql appears to be wrong. This is a pretty common scenario for me since I am using partitioned tables.
Stack trace
N/A - there is no error but here is the generated (formatted) query:
As you can see, the where is looking for
"program_id", "program_organization_id"
but the inner select returns"site_id", "program_id"
(I translated them). So it never matches and updates 0 rows.To Reproduce
I updated my previous example here with a new test:
https://github.com/erik-induro/mikro-orm-fk
Expected behavior
The entity should be updated.
Additional context
N/A
Versions
The text was updated successfully, but these errors were encountered: