db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew T. Adams" <matthew.ad...@xcalia.com>
Subject RE: deletePersistent() with a detached object
Date Mon, 06 Feb 2006 16:54:46 GMT
I would say that yes, this is correct, but what happens if the corresponding
persistent instance implements DeleteCallback?  I think that the spec should
require the implementation to load the persistent instance and call its
jdoPreDelete() method, and call any lifecycle listener methods that may be
registered to listen for the deletion of objects of the deleted object's
class.

--matthew

>-----Original Message-----
>From: Andy Jefferson [mailto:andy@jpox.org] 
>Sent: Monday, February 06, 2006 8:32 AM
>To: jdo-dev@db.apache.org; jdo-experts-ext@Sun.COM
>Subject: deletePersistent() with a detached object
>
>
>What is the expected behaviour when calling deletePersistent() 
>with a detached
>object ?
>Spec section 12.6.7 doesn't explicitly mention it.
>
>Since makePersistent() will now take detached objects and 
>persist them, I would
>probably expect deletePersistent() to perform the deletion of 
>the underlying
>persistent object (if it is persistent in this datastore). Is 
>this a correct
>understanding ?
>
>Thanks
>-- 
>Andy
>



Mime
View raw message