Re: EODatabaseContext.Delegate

Zak Burke <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Zak Burke wrote on 5/23/06 12:36 PM:
> I have a particular EC save operation that needs to be reorganized
> (deletes need to happen before inserts). I have found
> EODatabaseContext.Delegate.databaseContextWillOrderAdaptorOperations(),
> but I can't figure out how to get to an EODatabaseContext from my
> EOEditingContext (EC).

Off-list, somebody pointed out that you can set a default delegate in,
say, Application.java to run when your app starts up:

EODatabaseContext.setDefaultDelegate(new MyDelegate());

That's a great start; it gives me a way to reorder all my operations.
Now, is there any way to do this only in particular circumstances?

I don't really want to set a *default* delegate; I want to set a
delegate for a particular transaction. Using a delegate for all
transactions, when it is only needed for a small percentage of them,
seems awfully inefficient.

zak.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.