You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrei Koiro (JIRA)" <ji...@apache.org> on 2016/06/15 14:14:09 UTC

[jira] [Created] (CAY-2091) Cayenne.objectForPK(ObjectContext, Class, Id) returns a wrong class instance

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)