cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Koiro (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:39:09 GMT

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

Andrei Koiro commented on CAY-2091:
-----------------------------------

I discovered  this issue a few minutes ago when upgraded cayenne in our project, and our project
has a test which shows it.  

> 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