[
https://issues.apache.org/jira/browse/OPENJPA-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Donald Woods updated OPENJPA-1256:
----------------------------------
Affects Version/s: (was: 2.0.0)
2.0.0-M2
Fix Version/s: (was: 2.0.0)
2.0.0-M3
Assignee: Fay Wang
> 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-M2
> Reporter: Fay Wang
> Assignee: Fay Wang
> Fix For: 2.0.0-M3
>
>
> 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.