batch fetching
batch fetching
- Subject: batch fetching
- From: Mike Schrag <email@hidden>
- Date: Sat, 2 Dec 2006 11:45:50 -0500
I was doing some digging working on PW and I thought I'd share an
interesting tidbit ... EODatabaseContext's batchFetchRelationship is
actually much smarter than I originally thought. If you call
databaseContext.batchFetchRelationship(employeesRelationship,
anArrayOfCompanies, editingContext), it will actually do a SINGLE
query to fetch all of the employees for all of the companies, then go
back through using the inverse relationship employee.company and
shuffle the big set of employees back into the appropriate per-
company employee relationships. But just so I don't make
batchFetchRelationship's head too big, it is still EOF, so it will
make an enormous EOOrQualifier of the companies rather than a
slightly nicer In-Set qualifier.
ms
_______________________________________________
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