[ 
https://issues.apache.org/jira/browse/CAY-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15996593#comment-15996593
 ] 

Nikita Timofeev commented on CAY-2282:
--------------------------------------

Hi Matt,

I've done some experiments regarding flattened relationships update and found 
that the problem is really deep and requires to change some basic concepts of 
flattened attributes and relationships as Cayenne can't deal with update of 
those. So this problem really not in inheritance itself but in the underlying 
"flattened" mechanics.
I'll create new task for the required changes and it appears that it will be 
postponed till 4.1 where we can break things a little bit and hopefully resolve 
this one as well as CAY-2146.

So for now I'll only apply your patch for the second part of this issue and 
your tests for the first (though disabled for now).

> 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
>              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
(v6.3.15#6346)

Reply via email to