You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Ravi P Palacherla (JIRA)" <ji...@apache.org> on 2009/07/28 20:25:14 UTC

[jira] Commented: (OPENJPA-1200) Incorrect Entity is returned if ElementClassCriteria is not selected.

    [ 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.