cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CAY-2405) Broken prefetch of entity with inheritance and attribute with custom java type
Date Thu, 08 Feb 2018 13:32:00 GMT

     [ https://issues.apache.org/jira/browse/CAY-2405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nikita Timofeev closed CAY-2405.
--------------------------------
    Resolution: Fixed

*4.1*: https://github.com/apache/cayenne/commit/7ae85329ca368523db1656e155f15094cbf87aa3

*4.0*: https://github.com/apache/cayenne/commit/2e4a10f0e2925f67aebe7c47163fbf05a3e36ed7

> Broken prefetch of entity with inheritance and attribute with custom java type
> ------------------------------------------------------------------------------
>
>                 Key: CAY-2405
>                 URL: https://issues.apache.org/jira/browse/CAY-2405
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 4.0.B2, 4.1.M1
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>            Priority: Major
>             Fix For: 4.0.B3, 4.1.M2
>
>
> This is a rare combination of query parameters, but it is perfectly valid.
>  * Prerequisites:
>  ** ObjEntity *A* with some set of attributes
>  ** ObjEntity *B* inherited from A with one additional attribute with {{Enum}} type (it
can be any type that isn't matched directly with underlying DB type)
>  ** ObjEntity *C* that have a relationship with *A*
>  * Query:
>  ** Select *C* with prefetch of *A*
>  * Outcome:
>  ** {{IllegalArgumentException}} when converting result set into objects
> It seems like java type of this additional attribute is not taken into account and defined
by {{DbAttribute}} type only.
> P.S. This one was found in {{cayenne-client}} stack in *4.0.B2* version, it is hard to
find directly as underlying data storage hides conversion error until attribute is fetched
directly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message