openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi P Palacherla (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1200) Incorrect Entity is returned if ElementClassCriteria is not selected.
Date Tue, 28 Jul 2009 18:25:14 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736198#action_12736198
] 

Ravi P Palacherla commented on OPENJPA-1200:
--------------------------------------------

Ref: http://n2.nabble.com/ClasscastException-when-ClassCrietria-is-not-used.-td3290568.html#a3290568

I have an openJPA application with following entities:

"Item" Entity with SINGLE_TABLE inheritance strategy.
 DiscriminatorColumn on this ITEM_TYPE.

"Book" and "Movie" entities extend "Item." 

Book has Many to One relation with Artist.
Movie has Many to One relation with Artist.

"artist.getBooks()" results in rows that contain both "Book" and"Movie"  hence I get the following
classcast :
Exception in thread "main" java.lang.ClassCastException: org.apache.openjpa.enhance.model$Movie$pcsubclass


I think artist.getBooks() returning Movie is a BUG and hence opened this JIRA.




> Incorrect Entity is returned if ElementClassCriteria is not selected.
> ---------------------------------------------------------------------
>
>                 Key: OPENJPA-1200
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1200
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>         Attachments: OPENJPA-1200_trunk.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message