[
https://issues.apache.org/jira/browse/CAY-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nikita Timofeev reassigned CAY-2890:
------------------------------------
Assignee: Nikita Timofeev
> Vertical Inheritance: Updating 1-Many with FK on Child Table Fails
> ------------------------------------------------------------------
>
> Key: CAY-2890
> URL: https://issues.apache.org/jira/browse/CAY-2890
> Project: Cayenne
> Issue Type: Bug
> Affects Versions: 4.2.2, 5.0-M1, 5.0-M2
> Reporter: Jadon Hansell
> Assignee: Nikita Timofeev
> Priority: Major
> Fix For: 4.2.3, 5.0-M2
>
> Attachments: 2890-breaking-tests.patch
>
>
> If there is a one-to-many relationship where the foreign key is on the child
> table in a vertical inheritance scenario, updating the relationship will
> sometimes delete the row on the child table or try to insert a row with
> mostly null values into the child table instead of updating it.
> The issue seems to happen when the update to the has-many side of the
> relationship is processed first in
> `ArcValuesCreationHandler.processFlattenedPath`. When the update to the
> belongs-to side of the relationship is processed first it issues an update as
> normal, then skips the has-many side because the inverse relationship has
> already been processed.
> As a side note, when I implemented a breaking test for this, on one of the
> test cases cases the GraphBasedDbRowOpSorter throws an error saying that
> there is a `Cycle detected in list for keys`.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)