• 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: DistinctRows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DistinctRows


  • Subject: Re: DistinctRows
  • From: Art Isbell <email@hidden>
  • 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. I suspect only the attribute bound to the popup button's displayString key is not distinct. 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?


Art
http://homepage.mac.com/aisbell/
_______________________________________________
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: DistinctRows
      • From: Chuck Hill <email@hidden>
References: 
 >Re: DistinctRows (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: DistinctRows
  • Next by Date: Re: Help: unreported exception java.io.IOException; must be caught or declared to be thrown
  • Previous by thread: Re: DistinctRows
  • Next by thread: Re: DistinctRows
  • Index(es):
    • Date
    • Thread