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] [Created] (CAY-2091) Cayenne.objectForPK(ObjectContext, Class, Id) returns a wrong class instance
Date Wed, 15 Jun 2016 14:14:09 GMT
Andrei Koiro created CAY-2091:
---------------------------------

             Summary: 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