You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Lachlan Deck <la...@gmail.com> on 2009/09/16 09:20:24 UTC

undelete

Hi there,

say an object has been marked for deletion  
[getObjectContext.deleteObject(foo)] but prior to commit you want to  
reverse that - but without discarding other changes in the context...  
what's the trick?

Thanks.

with regards,
--

Lachlan Deck


Re: undelete

Posted by Lachlan Deck <la...@gmail.com>.
On 16/09/2009, at 10:22 PM, Andrus Adamchik wrote:

> I think context.invalidateObjects(..) should do the trick.

Cool, thanks Andrus. I'll come back if problems persist ;-)

> Andrus
>
> On Sep 16, 2009, at 3:20 AM, Lachlan Deck wrote:
>
>> Hi there,
>>
>> say an object has been marked for deletion  
>> [getObjectContext.deleteObject(foo)] but prior to commit you want  
>> to reverse that - but without discarding other changes in the  
>> context... what's the trick?
>>
>> Thanks.
>>
>> with regards,
>> --
>>
>> Lachlan Deck
>>
>>
>

with regards,
--

Lachlan Deck




Re: undelete

Posted by Andrus Adamchik <an...@objectstyle.org>.
I think context.invalidateObjects(..) should do the trick.

Andrus

On Sep 16, 2009, at 3:20 AM, Lachlan Deck wrote:

> Hi there,
>
> say an object has been marked for deletion  
> [getObjectContext.deleteObject(foo)] but prior to commit you want to  
> reverse that - but without discarding other changes in the  
> context... what's the trick?
>
> Thanks.
>
> with regards,
> --
>
> Lachlan Deck
>
>