• 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
NSArray is not a NSSet. So why Apple confuse them in EOF?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSArray is not a NSSet. So why Apple confuse them in EOF?


  • Subject: NSArray is not a NSSet. So why Apple confuse them in EOF?
  • From: DevReseune <email@hidden>
  • Date: Sun, 9 Nov 2003 17:38:00 +0100

Hi,

The to-many relationship returns a NSArray. But, a NSArray is an
ordered array, and an object can be more than one in it. In EOF, it's
false. For example:
Book 0..* (books) -------------- 1 (author) Writer

You can add only once, and the order is not preserved. So, it's a NSSet.

In Hibernate, you can have a true array:

http://www.hibernate.org/hib_docs/reference/html/collections.html

<array name="foos" table="BAR_FOOS" cascade="all">
     <key column="BAR_ID"/>
     <index column="I"/>
     <many-to-many column="FOO_ID" class="com.illflow.Foo"/>
</array>

or
<set name="names" table="NAMES">
     <key column="GROUPID"/>
     <element column="NAME" type="string"/>
</set>

So, why EOF hasn't the same feature? And how have it now?

But Hibernate has another important feature! It can manage for you a
NSDictionary (Map):

<map name="holidays" table="holidays" schema="dbo" order-by="hol_name
asc">
     <key column="id"/>
     <index column="hol_name" type="string"/>
     <element column="hol_date" type="date"/>
</map>

When we can have the same feature in EOF?

Fridiric
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSArray is not a NSSet. So why Apple confuse them in EOF?
      • From: Ricardo Strausz <email@hidden>
    • Re: NSArray is not a NSSet. So why Apple confuse them in EOF?
      • From: David Neumann <email@hidden>
  • Prev by Date: A simplest way to manage relationship?
  • Next by Date: Re: Deployment - OS X, Apache, WO
  • Previous by thread: Re: A simplest way to manage relationship?
  • Next by thread: Re: NSArray is not a NSSet. So why Apple confuse them in EOF?
  • Index(es):
    • Date
    • Thread