MountainClimb / datanucleus-appengine

Automatically exported from code.google.com/p/datanucleus-appengine
0 stars 0 forks source link

Exception when querying Parent's Unowned field - key of parameter value does not have a parent #272

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run attached test named testUnownedQuery() (jdoconfig.xml is attached)
2. Note exception (below)

What is the expected output? What do you see instead?
Query should return 1 object; Instead, an exception is thrown as the 
UnownedField does NOT in fact have a parent by design (it's unowned).

What version of the product are you using? On what operating system?
Latest snapshot compiled on my machine. Win 7.

Please provide any additional information below.

Original issue reported on code.google.com by vadim.ya...@gmail.com on 29 Feb 2012 at 6:26

Attachments:

GoogleCodeExporter commented 8 years ago
org.datanucleus.exceptions.NucleusFatalUserException: SELECT FROM 
com.ysc.service.server.UnownedTests$Parent WHERE this.unownedField == uf 
PARAMETERS com.ysc.service.server.UnownedTests$UnownedField uf: Key of 
parameter value does not have a parent.
    at com.google.appengine.datanucleus.query.DatastoreQuery.processPersistableMember(DatastoreQuery.java:1465)
    at com.google.appengine.datanucleus.query.DatastoreQuery.addLeftPrimaryExpression(DatastoreQuery.java:1172)
    at com.google.appengine.datanucleus.query.DatastoreQuery.addExpression(DatastoreQuery.java:902)
    at com.google.appengine.datanucleus.query.DatastoreQuery.addFilters(DatastoreQuery.java:861)
    at com.google.appengine.datanucleus.query.DatastoreQuery.compile(DatastoreQuery.java:219)
    at com.google.appengine.datanucleus.query.JDOQLQuery.performExecute(JDOQLQuery.java:157)
    at org.datanucleus.store.query.Query.executeQuery(Query.java:1791)
    at org.datanucleus.store.query.Query.executeWithArray(Query.java:1667)
    at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:243)
    at com.ysc.service.server.UnownedTests.testUnownedQuery(UnownedTests.java:145)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    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:50)
    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)

Original comment by vadim.ya...@gmail.com on 1 Mar 2012 at 3:42

GoogleCodeExporter commented 8 years ago
I have no such problem with current code

Original comment by googleco...@yahoo.co.uk on 17 Mar 2012 at 6:03