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

Nikita Timofeev commented on CAY-2855:
--------------------------------------

Hi [~jhansell] I've implemented an experimental fix for this: 
https://github.com/apache/cayenne/commit/b625eaea19417f9ed7787450a253712e969bed3c
 
I'm almost certain we need to revisit it. But probably it'll wait until we take 
a big fight on the inheritance implementation that is really long in our plans.

> Vertical Inheritance: Fix Disjoint By Id Prefetch On Sub-Entity
> ---------------------------------------------------------------
>
>                 Key: CAY-2855
>                 URL: https://issues.apache.org/jira/browse/CAY-2855
>             Project: Cayenne
>          Issue Type: Bug
>    Affects Versions: 4.2
>            Reporter: Jadon Hansell
>            Assignee: Nikita Timofeev
>            Priority: Major
>             Fix For: 4.2.2, 5.0-M1
>
>         Attachments: disjoint-by-id-issue.patch
>
>
> I ran into an issue with prefetching a belongs-to relationship whose target 
> was the sub-entity of a vertical inheritance scenario. When {{disjointById}} 
> is used, the select for the sub-entity looks for an ID of {{null}} instead of 
> the actual ID assigned to the relationship.
> For example, lets say I have a base entity {{Base}}, a vertically inherited 
> sub-entity {{Impl}}, and a separate entity called {{Other}}.
> If {{Other}} has a belongs-to relationship to {{Impl}} called  
> {{Other.impl}}, attempting to use a {{disjointById}} prefetch on that 
> relationship will always find no results.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to