-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support combination of many-to-one/cacade/explicit composite PK #6417
Conversation
efbf143
to
880f58e
Compare
PS, through doing this I've found that there's a number of ways the surrounding code could be refactored to make something like this easier to update -
|
handle setting values deeply in entities with relations in ColumnMetadata, also check for a virtual relationship column in rawsqlresultstoentitytransformer this allows us to handle a case where `many-to-one` with explicit composite PKs columns were failing to persist a second time- instead of correctly updating the field they would cause an insert to occur leading to a unique PK constraint error
880f58e
to
279340e
Compare
) handle setting values deeply in entities with relations in ColumnMetadata, also check for a virtual relationship column in rawsqlresultstoentitytransformer this allows us to handle a case where `many-to-one` with explicit composite PKs columns were failing to persist a second time- instead of correctly updating the field they would cause an insert to occur leading to a unique PK constraint error
I just raised an issue which I think is linked to this: #10450 In my case the composite primary key being updated includes the foreign key to the parent and you get a constraint error. When updating a child with a single primary key or a composite key that does not include the foreign key, updating works ok. |
handle setting values deeply in entities with relations in ColumnMetadata,
also check for a virtual relationship column in rawsqlresultstoentitytransformer
this allows us to handle a case where
many-to-one
with explicit composite PKscolumns were failing to persist a second time- instead of correctly updating the
field they would cause an insert to occur leading to a unique PK constraint error
Fixes #6416
Fixes #4969
Fixes #4122