db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bouschen <mbo.t...@spree.de>
Subject Re: VOTE: Change handling of null primary key during makePersistent of SingleFieldIdentity classes
Date Thu, 07 Jul 2005 22:33:37 GMT
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:Craig.Russell@sun.com
>
> P.S. A good JDO? O, Gasp!
>
>


-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin			


Mime
View raw message