cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Razumovsky <razumovsky.and...@gmail.com>
Subject Re: delete new --> transient?
Date Thu, 26 Nov 2009 15:24:29 GMT
Because for deleted objects DELETE query will be forced, and if you create
(register), then delete (unregister) an object it looks like as if it was
never registered in context.
Why you need such testing? Currently I can think only of quite nasty
workaround on ROP 3.0 - using custom contexts and overriding deleteObject()

2009/11/26 Lachlan Deck <lachlan.deck@gmail.com>

> Hi there,
>
> just wondering why when deleting a new object that its status is being set
> to PeristenceState.TRANSIENT rather than DELETED?
>
> @see ObjectContextDeleteAction#deleteNew(Persistent)
> It also doesn't turn up in context.deletedObjects
>
> So this all seems to make it more difficult to determine the state of an
> object.
>
> Regardless of the rationale - what's the recommended way of determining if
> an object is deleted within the context?
> Thanks.
>
> with regards,
> --
>
> Lachlan Deck
>
>


-- 
Andrey

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