openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Przemek Koprowski (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-494) Single Table Inheritance Strategy causes errors when reading entities from the database (discriminator problem)
Date Thu, 17 Jul 2008 09:53:31 GMT

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

Przemek Koprowski updated OPENJPA-494:
--------------------------------------

    Affects Version/s: 1.1.0

> Single Table Inheritance Strategy causes errors when reading entities from the database
(discriminator problem)
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-494
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-494
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 1.0.1, 1.1.0
>         Environment: Windows XP, Java 5.0 IBM
>            Reporter: Przemek Koprowski
>            Assignee: Pinaki Poddar
>         Attachments: SingleTableDiscriminatorProblem.zip
>
>
> It appears that versions from 1.0 don't handle correctly discriminating objects received
from the datastore when the inheritance strategy is set to SINGLE_TABLE.
> Error I receive from test cases (attached):
> <openjpa-1.0.1-r420667:592145 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
Cannot load object with id "2".  Instance "jpa.Admin-2" with the same id already exists in
the L1 cache.  This can occur when you assign an existing id to a new instance, and before
flushing attempt to load the existing instance for that id.
> FailedObject: jpa.Admin-2
> This problem doesn't occur in OpenJPA version 0.9.7.
> Trace:
> <openjpa-1.0.1-r420667:592145 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
Cannot load object with id "2".  Instance "jpa.Admin-2" with the same id already exists in
the L1 cache.  This can occur when you assign an existing id to a new instance, and before
flushing attempt to load the existing instance for that id.
> FailedObject: jpa.Admin-2
> 	at org.apache.openjpa.kernel.BrokerImpl$ManagedCache.add(BrokerImpl.java:4444)
> 	at org.apache.openjpa.kernel.BrokerImpl.setStateManager(BrokerImpl.java:3779)
> 	at org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:303)
> 	at org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:264)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:330)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:255)
> 	at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> 	at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> 	at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:843)
> 	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:801)
> 	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:723)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.find(JDBCStoreManager.java:748)
> 	at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.load(RelationFieldStrategy.java:570)
> 	at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:802)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:485)
> 	at org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:116)
> 	at org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78)
> 	at org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:2867)
> 	at org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManagerImpl.java:2945)
> 	at org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(StateManagerImpl.java:1449)
> 	at org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateManagerImpl.java:1434)
> 	at jpa.RegularUser.pcGetadmin(RegularUser.java)
> 	at jpa.RegularUser.getAdmin(RegularUser.java:16)
> 	at TestCase.testL1ProductEasier(TestCase.java:38)

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