• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using Custom Data types in EOModeler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Using Custom Data types in EOModeler (From: Merul Patel <email@hidden>)

  • Prev by Date: Re: Fetch spec "where not In"
  • Next by Date: Re: Fetch spec "where not In"
  • Previous by thread: Using Custom Data types in EOModeler
  • Next by thread: Re: Using Custom Data types in EOModeler
  • Index(es):
    • Date
    • Thread