Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composite PK auto-generation (compound identity support) #40

Open
andyjefferson opened this issue Apr 11, 2016 · 0 comments
Open

Composite PK auto-generation (compound identity support) #40

andyjefferson opened this issue Apr 11, 2016 · 0 comments

Comments

@andyjefferson
Copy link
Member

The org.datanucleus.enhancer.asm.primarykey.PrimaryKeyGenerator class has several TODOs that indicate support for compound identity is missing. This would be nice to have so I'm just opening a bug to request/track the additional feature.

If this isn't liable to coming anytime soon, I'd recommend that an error/warning be spit out during enhancement to mention that these classes aren't supported. As things stand now, this looks like it works up until runtime, when an exception similar to the following is thrown:
java.lang.NoSuchFieldError: thresholdRule
at com.knowledgecc.cxmlchecker.threshold.ThresholdRuleValidator_PK.hashCode(Unknown Source)
at java.util.HashMap.put(HashMap.java:418)
at org.datanucleus.util.ReferenceValueMap.put(ReferenceValueMap.java:145)
at org.datanucleus.cache.SoftRefCache.put(SoftRefCache.java:51)
at org.datanucleus.ObjectManagerImpl.putObjectIntoCache(ObjectManagerImpl.java:3874)
at org.datanucleus.ObjectManagerImpl.replaceObjectId(ObjectManagerImpl.java:3821)
at org.datanucleus.jdo.state.JDOStateManagerImpl.setIdentity(JDOStateManagerImpl.java:941)
at org.datanucleus.jdo.state.JDOStateManagerImpl.initialiseForPersistentNew(JDOStateManagerImpl.java:470)
at org.datanucleus.state.StateManagerFactory.newStateManagerForPersistentNew(StateManagerFactory.java:151)
at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1427)
at org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1241)
at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:655)
at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:680)
at com.knowledgecc.entity.ThresholdRuleValidatorModelTest.saveValidator(ThresholdRuleValidatorModelTest.java:333)
at com.knowledgecc.entity.ThresholdRuleValidatorModelTest.testModelForSavedInstance(ThresholdRuleValidatorModelTest.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant