Re: Getting information on updated n:m relationship
Re: Getting information on updated n:m relationship
- Subject: Re: Getting information on updated n:m relationship
- From: Guido Neitzer <email@hidden>
- Date: Fri, 9 Mar 2007 13:56:40 -0700
On 09.03.2007, at 12:17, Mike Schrag wrote:
Yes ... They are a pain. I recently had to fight this part of EOF
to get notifications of to-many changes for multicast
notification. If you're talking actually getting updates when the
to-many snapshot cache updates, here's a stack trace from that
happening:
Thanks Mike for sharing that information!
It turns out that this is one of the few places in EOF where there
just is no hook to get to it cleanly. In Wonder, we extend
EODatabaseContext and EODatabase to be able to watch for changes to
the cache.
It seems that listening for "objectsChangedInStoreNotification" gave
us the object we were actually looking for.
I'm not working on that myself, so I can't say for sure, but it seems
to have solved that specific problem we had. Might not be a general
solution, but for us it seems (isn't implemented so far, just in the
"coding stage").
Adding in hooks into your EOGenerator classes will probably go
pretty far for you.
Yeah, we thought of that too, but as the code design isn't really
prepared for doing that stuff at the EO level (like getting the
logged in user from somewhere) there would have been more changes
involved. Because of that we try whether the notification brings us
far enough.
If you use Wonder, you potentially can hang off of the stuff that
already happens in there, but you have to be a little careful,
because you're transactionally in a weird place when the snapshot
cache is updating.
I personally do use Wonder, but the project where this question was
for is not using Wonder. So a lot of things I do in a very convenient
way (like using ERXThreadStorage a lot, letting ERXEC take care of
things and so on) just don't work for that project right now. We are
thinking of getting the project to use Wonder, but it might be a big
thing to do.
cug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden