NSArray is not a NSSet. So why Apple confuse them in EOF?
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.