cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Larson (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAY-2693) Abstract subentities do not have rows materialized correctly
Date Fri, 18 Dec 2020 16:12:00 GMT

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

John Larson edited comment on CAY-2693 at 12/18/20, 4:11 PM:
-------------------------------------------------------------

In my posted file, the first condition need not check to see if the entity is abstract. Abstract
or not, if there are no subentities, it should return the declared qualifier

    *public* Expression qualifierForEntityAndSubclasses() {

            *if* (subentities == *null*) *return* entity.getDeclaredQualifier();


was (Author: larsonja):
 The first condition need not check to see if the entity is abstract. Abstract or not, if
there are no subentities, it should return the declared qualifier

    *public* Expression qualifierForEntityAndSubclasses() {

            *if* (subentities == *null*) *return* entity.getDeclaredQualifier();

> Abstract subentities do not have rows materialized correctly
> ------------------------------------------------------------
>
>                 Key: CAY-2693
>                 URL: https://issues.apache.org/jira/browse/CAY-2693
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Database integration
>    Affects Versions: 4.1
>            Reporter: John Larson
>            Assignee: Nikita Timofeev
>            Priority: Minor
>              Labels: query-lifecycle, query_generator
>             Fix For: 4.1.1, 4.2.M3
>
>         Attachments: EntityInheritanceTree.java
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Given an inheritance tree such as (qualifiers are in parentheses):
> abstract class A
> concrete class B extends A (type = 0)
> abstract class C extends A
> concrete class D extends C (type = 1)
> concrete class E extends C (type=2)
> and single-table inheritance.
> When querying on class A and results include a row of type D, EntityInheritanceTree will
return C as the matching entity. In fact, even if the results include a row of type B, if
entityMatchingRow will return C if it is checked before entity B.
> Also, qualifierForEntityAndSubclasses will return a null qualifier for type C when it
should really return (type =1) or (type = 2).
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message