|Re: [CDO] Finding detached objects [message #905331 is a reply to message #905327]
||Thu, 30 August 2012 07:22
| Esteban Dugueperoux
Registered: July 2009
You can attach a CDOTransactionHandler1 to your CDOTransaction to be
notified of attached/detached/modifyed objects.
On 30/08/2012 09:17, Anders Jönsson wrote:
> I have CDO objects that are referenced from a "data structure". I want
> to update that structure in one batch AFTER a successful commit. The
> problem is to find the objects that where detached in the commit.
> I have tried a few options:
> Seems like the perfect fit since it gives you a CDOIDAndVersion object
> for every added, changed or detached object after a commit (from
> anywhere). Finding the actual added and changed objects is easy using
> view.getObject(cdoIDAndVersion.getID()). BUT how do I find the detached
> objects in/from the committing CDOTransaction? You can't use the same
> view.getObject method since detached objects are no longer present in
> the committing CDOTransaction.
> Another seemingly perfect fit. Gives you added, changed and detached
> object instances from the view receiving the event. BUT this event
> doesn't get sent to the committing transaction, only to all other views.
> So, how do I use invalidation events, or some other mechanism, to get
> the actual instances of still referenced but removed (from a CDO
> perspective) objects from the committing transaction?
Powered by FUDForum
. Page generated in 0.06386 seconds