Here's a snippet of my ode,
(Department) es.find(Department.class, "N/A");
(PrintQueue) es.find(PrintQueue.class, "N/A");
Both Department and PrintQueue entities are based upon the same super class
but I use table per class so they are in separate tables.
As you can see they both have the same key, but if I put the department line
1st the find of the print queue will generate a class cast exception trying
to cast a Department to a PrintQueue. If I put the PrintQueue line 1st I
will get a class cast exception trying to cast a PrintQueue to a
Department. The second find doesn't generate any SQL if I have trace
logging turned on so it looks to me that it is a cache issue.
I can't see anything like this in the JIRA is it a known bug or not?
JPA 2.0.0, build time enhanced
Chris