openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <j...@apache.org>
Subject [jira] Updated: (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:12:27 GMT

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

Jeremy Bauer updated OPENJPA-1674:
----------------------------------

    Attachment: OPENJPA-1674_test.patch

I've attached a simple test case for this problem.  It is currently marked @AllowFailure.
 Be sure to comment that out in order to get a report of the failure.

> 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
>         Attachments: OPENJPA-1674_test.patch
>
>
> 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