db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (JDO-330) JPOX fails to populate fields in fetch plan during detachCopy
Date Thu, 09 Mar 2006 01:03:39 GMT
     [ http://issues.apache.org/jira/browse/JDO-330?page=all ]
Craig Russell resolved JDO-330:

    Resolution: Invalid
     Assign To: Craig Russell

This was a user error. The FetchPlan used the default MaxFetchDepth which is 1. None of the
related instances' fields were set by the detach because of this error.

This highlights an interesting usability issue with FetchPlan. The default FetchPlan MaxFetchDepth
is designed to avoid accidentally retrieving the entire database into memory, but it needs
to be carefully thought about.

> JPOX fails to populate fields in fetch plan during detachCopy
> -------------------------------------------------------------
>          Key: JDO-330
>          URL: http://issues.apache.org/jira/browse/JDO-330
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Versions: JDO 2 rc1
>  Environment: JPOX
>     Reporter: Craig Russell
>     Assignee: Craig Russell
>      Fix For: JDO 2 final

> After applying the patch in JDO-272, JPOX fails:
>     [java] 1) testDetachCopy(org.apache.jdo.tck.api.persistencemanager.detach.DetachCopy)javax.jdo.JDODetachedFieldAccessException:
You have just attempted to access field "cart" yet this field was not detached when you detached
the object. Either dont access this field, or detach the field when detaching the object.
>     [java]      at org.apache.jdo.tck.pc.shoppingcart.CartEntry.jdoGetcart(CartEntry.java)
>     [java]      at org.apache.jdo.tck.pc.shoppingcart.CartEntry.getCart(CartEntry.java:62)
>     [java]      at org.apache.jdo.tck.api.persistencemanager.detach.DetachTest.checkCartValues(DetachTest.java:140)
>     [java]      at org.apache.jdo.tck.api.persistencemanager.detach.DetachTest.checkCartValues(DetachTest.java:122)
>     [java]      at org.apache.jdo.tck.api.persistencemanager.detach.DetachCopy.testDetachCopy(DetachCopy.java:68)
>     [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     [java]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:206)
>     [java]      at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
>     [java]      at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
> The field is part of the fetch plan in effect when the instances are detached.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message