You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2016/06/15 14:21:09 UTC
[jira] [Commented] (CAY-2091) Cayenne.objectForPK(ObjectContext,
Class, Id) returns a wrong class instance
[ 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)