Hi Andy,

On Jan 2, 2008, at 8:44 AM, Andy Jefferson wrote:

Will the method throw a javax.jdo.JDODetachedFieldAccessException
or silently ignore non-loaded fields in detached objects?

I'd just expect a silent ignore.
The only place a JDODetachedFieldAccessException should be thrown is in any actual access of the field (jdoGetXXX with persistent fields, or getXXX with
persistent properties)

This might be an academic discussion. But what fun. ;-)

The main reason for jdoMakeDirty is to mark fields that cannot mark themselves as dirty; that is array types that by implementation cannot be extended or enhanced. If an array type field has a non-null value that needs to be marked dirty, then the field is loaded. And if the value is loaded, jdoMakeDirty won't throw an exception.

For consistency, though, I'd have to vote for jdoMakeDirty throwing an exception on an unloaded field.

Craig


--
Andy  (Java Persistent Objects - http://www.jpox.org)

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