Re: Using Custom Data types in EOModeler
Re: Using Custom Data types in EOModeler
- Subject: Re: Using Custom Data types in EOModeler
- From: Art Isbell <email@hidden>
- Date: Wed, 17 Sep 2003 10:10:31 -1000
On Wednesday, September 17, 2003, at 04:03 AM, Merul Patel wrote:
I'm trying to store a NSDictionary object into my database, and had
hoped to be able to assign suitable Factory and Conversion methods,
but it seems this isn't possible without defining my own custom class
extending NSDictionary, since NSDictionary does have any methods that
can act of NSString or NSData to instantiate an NSDictionary.
You might want to consider using EOGenericRecord rather than
NSDictionary for representing DB data. EOGenericRecord might be
thought of as an NSMutableDictionary that is designed specifically to
represent DB data. You can use the same key value coding methods to
set and get data from both an EOGenericRecord and NSMutableDictionary
and EOGenericRecord works great in an eomodel. EOGenericRecord
implements takeValuesFromDictionary() and valuesForKeys() that support
moving data easily between an NSDictionary and EOGenericRecord.
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.