[ https://issues.apache.org/jira/browse/CAY-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465963#comment-16465963 ]
Nikita Timofeev commented on CAY-2282: -------------------------------------- I've pushed fix into master [1], it should cover most cases of flattened attributes and relationships inserts and updates. Though this is not a fix I really wish to make, as all this mechanics are still overcomplicated and obscure, so some issues may still be hiding in there. [1] https://github.com/apache/cayenne/commit/f0b2ed009e0ffec167f002ed046bc9228e11993c > Various Update Issues With Vertical Inheritance > ----------------------------------------------- > > Key: CAY-2282 > URL: https://issues.apache.org/jira/browse/CAY-2282 > Project: Cayenne > Issue Type: Bug > Components: Core Library > Affects Versions: 4.0.M5 > Reporter: Matt Watson > Assignee: Nikita Timofeev > Priority: Major > Labels: inheritance, lock, optimistic, relationship, update, > vertical > Attachments: breaking_test.patch, > fixes-2-testUpdateWithOptimisticLocks.patch > > > The two tests in the attached "breaking-test" patch show the two scenarios > that are broken. > 1) {{testUpdateTwoObjectsWithMultipleAttributeAndMultipleRelationship}} : > breaks because of the relationship change. Without changing relationship the > update actually works fine. But with the relationship change its going > through {{DataDomainIndirectDiffBuilder.arcDeleted}} and > {{DataDomainIndirectDiffBuilder.arcCreated}} thus creating flattened Insert > and Delete statements instead of an UPDATE statement. > 2) {{testUpdateWithOptimisticLocks}} : breaks because the vertically > inherited ObjEntity has an attribute using Optimistic Lock for a field that > is actually on the parent DbEntitity, and the Update query that is built is > incorrectly referencing the column on the wrong table for the > {{qualifierExpression}}. > I actually already have a fix ready for this 2nd issue, but want to get both > of these issues fixed in this ticket, so anyone helping on this issue please > focus on fixing the first test. -- This message was sent by Atlassian JIRA (v7.6.3#76005)