Hi Jörg,

Thanks for your comments.

On Jan 6, 2006, at 8:07 AM, Jörg von Frantzius wrote:

Craig L Russell wrote:

[..] With the default fetch plan in effect, the behavior of JDO 2 is very similar to the behavior of JDO 1. That is, when instances are loaded into memory in response to queries or navigation, only the fields in the default fetch group are loaded, and the jdoPostLoad callback is executed the first time an instance is fetched from the datastore. Upon detachment, fields that are already loaded into the detached instances are preserved;
The "already" in here sounds a bit to me like a detached instance could preserve state for fields that had been loaded prior to detaching, even when those fields were not contained in the current fetch plan upon detaching. If I remember correctly, this should not be the case?

With the default fetch plan in effect, detachment uses the DETACH_LOAD_FIELDS flag (set to true) and the DETACH_UNLOAD_FIELDS (set to false) to determine which fields should be preserved in the detached instance. So no fields are detached at detach time if they were loaded. If this is not the behavior you want, you can set the DETACH_UNLOAD_FIELDS flag to true and in this case fields not in the current fetch plan will be unloaded.

So I've updated the spec to make this clear:

<working draft>
With the default fetch plan in effect, the behavior of JDO 2 is very similar to the behavior of JDO 1. That is, when instances are loaded into memory in response to queries or navigation, fields in the default fetch group are loaded, and the jdoPostLoad callback is executed the first time an instance is fetched from the datastore. The implementation is allowed to load additional fields, as in JDO 1. Upon detachment, fields that are have been loaded into the detached instances are preserved, regardless of whether they were loaded automatically by the implementation or loaded in response to application access; and fields that have not been loaded are marked in the detached instances as not loaded. 
</working draft>

Craig

IMHO, just dropping the "already" would make this clearer, or maybe something like
"Upon detachment, only fields that were contained in the current fetch plan are preserved, all other fields are marked in the detached instances as not loaded."

Regards,
Jörg

-- 
__________________________________________________________
Dipl.-Inf. Jörg von Frantzius  |            artnology GmbH
                              |                Milastr. 4
Tel +49 (0)30 4435 099 26      |              10437 Berlin
Fax +49 (0)30 4435 099 99      |  http://www.artnology.com
_______________________________|__________________________


Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/jdo

408 276-5638 mailto:[EMAIL PROTECTED]

P.S. A good JDO? O, Gasp!


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to