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.