Re: NSArray is not a NSSet. So why Apple confuse them in EOF?
Re: NSArray is not a NSSet. So why Apple confuse them in EOF?
- Subject: Re: NSArray is not a NSSet. So why Apple confuse them in EOF?
- From: Ricardo Strausz <email@hidden>
- Date: Mon, 10 Nov 2003 13:24:04 -0600
Sorry, I did not get the point;
EOF does not uses NSSets, it allways use NSArrays (or Dictionaries)
---in fact it uses com.webobjects.foundation.NSArray which unfortunely
is *different* from com.apple.cocoa.foundation.NSArray---
What do you mean by saying it is an NSSet???
Dino
On domingo, novi 9, 2003, at 10:38 America/Mexico_City, DevReseune
wrote:
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.
_______________________________________________
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.