db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg von Frantzius <joerg.von.frantz...@artnology.com>
Subject Re: makePersistent detached instance deleted on database
Date Thu, 09 Mar 2006 02:10:32 GMT
Craig L Russell schrieb:
> Hi Erik,
>
> When you invoke makePersistent on a detached instance, the instance 
> must exist in the database. You don't insert it at commit.[..] 
Does that mean that makePersistent() must not insert detached instances 
for which it cannot find an object in the datastore?
 
In 12.6.7 it has "For a detached instance, they [the methods 
makePersistent() and makePersistentAll()] locate /or create a persistent 
instance/ with the same JDO identity as the detached instance, and merge 
the persistent state of the detached instance into the persistent 
instance."

I'm asking because our replication algorithm relies on that. Also I find 
it confusing that the method most prominently used for inserting new 
objects shouldn't do so for detached instances.
>
> Craig
>
> On Mar 8, 2006, at 7:14 AM, Erik Bengtson wrote:
>
>>
>>
>> Hi,
>>
>> What happens when we invoke makePersistent on a detached instance 
>> that was
>> deleted by another isolated process? I suspect that we raise an 
>> exception
>> instead of reinserting it for a second time. Is that right?
>>
>> Maybe this can be clarified in the spec.
>>
>> Regards,
>
> 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!
>



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message