Re: How can I cast a NSMutableDictionary to a EOEnterpriseObject
Chuck Hill <[email protected]> Mon, 17 Nov 2008 18:01:17 -0800
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Carl, Been a while! On Nov 17, 2008, at 4:57 PM, Carl E. Lindberg wrote: > > On Nov 17, 2008, at 3:53 PM, Mike Schrag wrote: > >>> But there are times when, for performance reasons, raw-row >>> fetching rather than eo fetching makes sense. In that case *if* >>> you need an eo from the raw row you'd use >>> eoeditingContext.faultForRawRow(...). >> On a related note, w(hy)tf is there not a direct way to turn a raw >> row into a snapshot cache entry + fault? > > EOUtilities.faultWithPrimaryKey() ? Or maybe that refetches the > row. Does EOUtilities.objectFromRawRow() ? All objectWithRawRow does is to extract the PK and then calls faultWithPrimaryKey() (IIRC). So if the EO has not been fetched and cached, this goes back to the database. > Otherwise, some combination of: > EOEntity.globalIDForRow() > EODatabaseContext.recordSnapshotForGlobalID() > EOEditingContext.objectForGlobalID() > > Been a while since I played with this stuff... can't remember if I > am missing any details... :-) That sounds about right. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects