[ 
https://issues.apache.org/jira/browse/OPENJPA-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871012#action_12871012
 ] 

Pinaki Poddar commented on OPENJPA-1674:
----------------------------------------

> OpenJPA is not differentiating between entity types with the same key when I 
> use table per class. 
It does if told to do so:
 openjpa.Compatibilty=StrictIdentityValues=true

The attached test will pass with the above config.

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

Reply via email to