Re: ERXEOControlUtilities.objectsInRange and prefetching brainstorm
Re: ERXEOControlUtilities.objectsInRange and prefetching brainstorm
- Subject: Re: ERXEOControlUtilities.objectsInRange and prefetching brainstorm
- From: Miguel Arroz <email@hidden>
- Date: Wed, 30 Jul 2008 16:48:30 +0100
Hi!
Yes, Mike pointed me to the Wonder batch stuff a moment ago, so
basically all my email is deprecated. :)
Also, I still have the problem of not being able to pre-fetch one-
to-one relationships. Yes, I know WO doesn't support one-to-one,
It doesn't?
but they are handy many times. And this is clearly a bug, because
the query - the correct query! - is made, but apparently the
objects are not integrated in the object graph.
I am not understanding this last bit.
Sorry, I was hungry and sleepy when I wrote that.
The idea is this: you have a to-one relationship from A to B (and
no inverse relationship, because it's a one-to-one). You create a
fetch spec to fetch As. You pass to the spec, using
setPrefetchingBlaBla() the key from that relationship (let's call it
"toB"). WO will run the correct query, the query will return the
correct results (the Bs) but they are not inserted in the graph. When
you pick up an A and call toB() on it, the object (B) is fetched again
from the database.
Already done. See ERXBatchFetchUtilities (formerly known as
ERXRecursiveBatchFetching)
Yes, that solved all my problems. :)
Yours
Miguel Arroz
http://www.survs.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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