cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAY-2091) Cayenne.objectForPK(ObjectContext, Class, Id) returns a wrong class instance
Date Wed, 19 Apr 2017 08:18:41 GMT

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

ASF GitHub Bot commented on CAY-2091:
-------------------------------------

GitHub user MegaPapa opened a pull request:

    https://github.com/apache/cayenne/pull/201

    CAY-2091 + entity inheritance test

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MegaPapa/cayenne CAY-2091

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cayenne/pull/201.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #201
    
----
commit 9c90374a76568eaedc9338a5bbb1158efdfbb52b
Author: Maxim Petrusevich <maks1464@gmail.com>
Date:   2017-04-19T08:17:09Z

    CAY-2091 + entity inheritance test

----


> 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.15#6346)

Mime
View raw message