db-jdo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renato Garcia <renatao.gar...@gmail.com>
Subject Re: Persistent-dirty retrieve
Date Mon, 14 Dec 2009 18:29:49 GMT

Tks for your answer.

So, it would load fields that haven't been load yet, keep the dirty ones 
untouched, and the status of the object would remain P_DIRTY, correct?

If that's correct, can we make a change to the TCK as suggested on this 
thread of Datanucleus ( 
http://www.jpox.org/servlet/forum/viewthread_thread,5891 )?

I have a scenario where my object is P_DIRTY and I have unloaded fields 
that I wan't to read their values in order to validate the object. 
However, calling retrieve on it has no effect when it is dirty. When 
this same object is not dirty, calling retrieve load the fields.


Craig L Russell wrote:
> Hi Renato,
> The purpose of retrieve is to load instances according to the current 
> fetch plan. But changed values are not overwritten by retrieve.
> If you want to overwrite values, then you should use refresh, which is 
> intended explicitly to overwrite changes.
> Best regards,
> Craig
> On Dec 14, 2009, at 5:27 AM, Renato Garcia wrote:
>> Hi,
>> Does a call to retrieve on a Persistent-dirty object should load it's 
>> fields? According to the spec, the status should remain unchanged, 
>> but I could not find anything regarding the actual load of the fields.
>> Tks for the clarification.
>> Renato
> Craig L Russell
> Architect, Sun Java Enterprise System http://db.apache.org/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!

View raw message