openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Davies (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1674) OpenJPA is not differentiating between entity types with the same key when I use table per class.
Date Mon, 24 May 2010 18:06:23 GMT
OpenJPA is not differentiating between entity types with the same key when I use table per
class.
-------------------------------------------------------------------------------------------------

                 Key: OPENJPA-1674
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1674
             Project: OpenJPA
          Issue Type: Bug
          Components: sql
    Affects Versions: 2.0.0
         Environment: Windows 7 / CentOS 5.4, MySQL 5.1
            Reporter: Christopher Davies


OpenJPA is not differentiating between entity types with the same key when I use table per
class.

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. 



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