Prefetching: Fetching versus Firing Faults?
Ashley Aitken <[email protected]> Tue, 14 Sep 2004 12:55:39 +0800
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
Howdy All, When one uses a fetch specification (either programmatically or from an EOModel) you can specify objects to prefetch (along with the fetched objects). For example, if I was fetching a customer object I could specify to prefetch the customer.address object and the customer.purchases array of objects. Is it possible to have the same (or similar functionality) when a fault is fired? For example, if I had a salesperson object that had a fault for the relationship customer, when the salesperson object accessed the customer object it would fetch not only the customer but also prefetch (as above). Would I need to set up my own fault handler (subclass of EOFaultHandler) or is there a simpler way? I would like to be able to just traverse the object graph and have this prefetching happen, rather than having to do explicit (programmatic or named) fetches all the time. Thanks for any suggestions or pointers. Cheers, Ashley. -- Ashley Aitken Perth, Western Australia mrhatken at mac dot com