Hi Craig,
[x] approve
Regards Michael
Javadogs,
A straightforward implementation of makePersistent will obtain the
value of the identity object by delegating to jdoNewObjectIdInstance
of the instance to be made persistent. This is the specified behavior:
A7.12-38 [For classes using single field identity, this method must be
called on an instance of a persistence-capable class with its primary
key field initialized (not null), or a JDOFatalInternalException is
thrown.]
The simple enhanced method will delegate to, e.g. new IntIdentity
passing the null field as the argument. This results in a
NullPointerException that needs to be caught by the enhanced code.
Proposal: Change the behavior of the SingleFieldIdentity classes to
throw JDONullIdentityFieldException. This allows a straightforward
implementation of enhanced classes to support single field identity.
[ ] approve
[ ] disapprove. Why?
Thanks,
Craig
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!
--
Michael Bouschen [EMAIL PROTECTED] Engineering GmbH
mailto:[EMAIL PROTECTED] http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin