cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAY-2091) Cayenne.objectForPK(ObjectContext, Class, Id) returns a wrong class instance
Date Wed, 15 Jun 2016 14:21:09 GMT

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

Andrus Adamchik commented on CAY-2091:
--------------------------------------

I wonder if I broke something when fixing this issue: CAY-2084  (it seems related, but really
it executes a query via a different path ... hmmm)

> Cayenne.objectForPK(ObjectContext, Class, Id) returns a  wrong class instance
> -----------------------------------------------------------------------------
>
>                 Key: CAY-2091
>                 URL: https://issues.apache.org/jira/browse/CAY-2091
>             Project: Cayenne
>          Issue Type: Bug
>    Affects Versions: 4.0.M4
>            Reporter: Andrei Koiro
>
> 1. There is this inheritance:
> abstract Product -> 
> ArticleProduct
> MembershipProduct
> VoucherProduct
> All types in one table 
> 2. There is the record in the db:
> MembershipProduct with id 1
> 3. Cayenne.objectForPK(ObjectContext, Product.class, 1L) 
> in cayenne 4.0M3 the methods returns an instance of MembershipProduct.class
> in cayenne 4.0M4(master branch)  the method returns an instance of Product.class 
> Is it an regression issue ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message