Re: DistinctRows
Re: DistinctRows
- Subject: Re: DistinctRows
- From: "Jonathan Fleming" <email@hidden>
- Date: Tue, 04 Mar 2003 00:54:47 +0000
Chuck, it didn't work but this I think is my fault again in my explaination,
see reply to Art's comment in text body
From: Art Isbell <email@hidden>
To: email@hidden
Subject: Re: DistinctRows
Date: Mon, 3 Mar 2003 13:43:46 -1000
On Monday, March 3, 2003, at 01:16 PM, Chuck Hill wrote:
There are several ways to accomplish this, including raw SQL and fetch
specs set to fetch distinct rows.
It's not clear to me that the rows fetched aren't already distinct. No
fetch spec is being used to fetch the objects, so unless duplicate rows are
in the DB, only the attribute value being displayed in the popup button is
not distinct.
NSArray pageNameList = EOUtilities.objectsForEntityNamed(ec, "TbNavPage");
NSSet uniquePageNameList = new NSSet(pageNameList);
NSMutableArray sortedNavPageNameList = new
NSMutableArray(uniquePageNameList.allObjects());
I initially thought about using NSSet, but this won't work >unless the
objects in the set are truly duplicates.
Well, you were right that it did't work and all I can do here is explain how
the EOModel is set up:
TBNavPage has 4 Attributes, 1) navPageName (String 2) navPageContent
(Object) 3) status (String) 4) visibility (String)
The Entity has no relationships to any tables in the database/EOModel. It's
stand alone.
I suspect only the attribute bound to the popup button's displayString key
is not distinct.
yes, this is what is listing duplicate page names as stated. Does this make
it any clearer for a solution.
But if that's the case, you wouldn't normally want to eliminate some of the
objects from the popup button list. Something's missing from this picture.
Jonathan?
I don't know what... give me an idea
Jonathan
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://messenger.msn.co.uk
_______________________________________________
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.