openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fay Wang (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-1256) get java.lang.ClassCastException when IdClass contains an Enum Field
Date Thu, 20 Aug 2009 18:29:14 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Fay Wang resolved OPENJPA-1256.
-------------------------------

    Resolution: Fixed

> get java.lang.ClassCastException when IdClass contains an Enum Field
> --------------------------------------------------------------------
>
>                 Key: OPENJPA-1256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1256
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.0.0
>            Reporter: Fay Wang
>             Fix For: 2.0.0
>
>
> Suppose EntityA and EntityB are defined as follows:
> @Entity
> class EntityA {
>    @Id
>     int id;
>   
>    @OneToOne(fetch=fetchType=LAZE)
>    EntityB entityB;
>    
>    ...
> }
> @Entity
> @IdClass(BId.class)
> class EntityB {
>     @Id
>     int intId;
>    @Id
>     BType bType;
> ...
>     public enum BType { A1, A2, A3, A4 };
>      ...
> }
> ClassCast Exception is thrown in the following situation:
>     EntityA a = em.find(EntityA.class, 1)
>     EntityB b = a.getEntityB();

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