Issue Details (XML | Word | Printable)

Key: NUCRDBMS-464
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Ray Hu
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Got exception if using subclass-table mapping and object graph was all bidirectional referenced

Created: 01/Oct/10 04:46 AM   Updated: 13/Nov/10 12:18 PM   Resolved: 06/Nov/10 10:26 AM
Component/s: None
Affects Version/s: 2.1.2, 2.2.0.m2
Fix Version/s: 2.1.3, 2.2.0.m3

File Attachments: 1. Zip Archive test.zip (4 kB)

Environment: JRE 1.6.0_17 ,Database H2 1.2.142 Windows 7

Forum Thread URL: http://www.datanucleus.org/servlet/forum/viewthread_thread,6321
Datastore: H2
Severity: Production


 Description  « Hide
Schema of following:
   A(extends AbstractA)->B->Clist
where A,B,C were all bidirectional referenced by using mapped-by and AbstractA mapped using subclass-table.

Add C to existing B got following exception:

[java] You have just executed an SQL statement yet the information for the primary key column(s) is not available! Please generate a testcase and report this issue
     [java] org.datanucleus.exceptions.NucleusException: You have just executed an SQL statement yet the information for the primary key column(s) is not available! Please generate a testcase and report this issue
     [java] at org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:312)
     [java] at org.datanucleus.store.rdbms.fieldmanager.ResultSetGetter.fetchObjectField(ResultSetGetter.java:163)
     [java] at org.datanucleus.state.AbstractStateManager.replacingObjectField(AbstractStateManager.java:1191)
     [java] at org.datanucleus.test.B.jdoReplaceField(B.java)
     [java] at org.datanucleus.test.B.jdoReplaceFields(B.java)
     [java] at org.datanucleus.jdo.state.JDOStateManagerImpl.replaceFields(JDOStateManagerImpl.java:2863)
     [java] at org.datanucleus.jdo.state.JDOStateManagerImpl.replaceFields(JDOStateManagerImpl.java:2882)
     [java] at org.datanucleus.state.ObjectProviderImpl.replaceFields(ObjectProviderImpl.java:69)
     [java] at org.datanucleus.store.rdbms.request.FetchRequest.execute(FetchRequest.java:334)
     [java] at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.fetchObject(RDBMSPersistenceHandler.java:319)
     [java] at org.datanucleus.jdo.state.JDOStateManagerImpl.loadFieldsFromDatastore(JDOStateManagerImpl.java:1932)
     [java] at org.datanucleus.jdo.state.JDOStateManagerImpl.loadUnloadedFields(JDOStateManagerImpl.java:1605)
     [java] at org.datanucleus.jdo.state.JDOStateManagerImpl.runReachability(JDOStateManagerImpl.java:3167)
     [java] at org.datanucleus.ObjectManagerImpl.performReachabilityAtCommit(ObjectManagerImpl.java:3389)
     [java] at org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:3243)
     [java] at org.datanucleus.ObjectManagerImpl$2.transactionPreCommit(ObjectManagerImpl.java:316)
     [java] at org.datanucleus.TransactionImpl.internalPreCommit(TransactionImpl.java:394)
     [java] at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:279)
     [java] at org.datanucleus.jdo.JDOTransaction.commit(JDOTransaction.java:90)
     [java] at org.datanucleus.test.Main.main(Main.java:57)

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 06/Nov/10 10:26 AM
SVN trunk works on this test. Will backport fix to 2.1 later

Andy Jefferson added a comment - 06/Nov/10 05:16 PM
Also fixed on branches/2.1 now