• 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: Grouping and aggregating EOs like GROUP BY
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grouping and aggregating EOs like GROUP BY


  • Subject: Re: Grouping and aggregating EOs like GROUP BY
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 12 Apr 2006 20:18:53 -0700

Hi John,

On Apr 12, 2006, at 3:09 PM, John Huss wrote:

What is the best way to group and aggregate an array of EOs,

The first thing you need to recognize is that an aggregation over a group of EOs results in raw data, not an EO.


essentially accomplishing the same thing as an SQL "group by" clause.
I already see that using raw sql is usually not the "best" way.  If
not raw sql, then how is this accomplished?

EOF won't generate the SQL "out of the box". I've seen several classes that will take a qualifier, entity, and an aggregate function and return the raw rows. I'd feel fairly certain that there is something to do this in WONDER, but I don't recall the name.


I've used ERXArrayUtilities.arrayGroupedByKeyPath before, but now I
need to group with multiple fields.  Is there some existing
functionality that provides something like this?

Sorry, I'm not that fluent in WONDER.

Chuck

--
Coming in late 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Grouping and aggregating EOs like GROUP BY (From: "John Huss" <email@hidden>)

  • Prev by Date: Re: Building a component action URL
  • Next by Date: Re: Grouping and aggregating EOs like GROUP BY
  • Previous by thread: Grouping and aggregating EOs like GROUP BY
  • Next by thread: Re: Grouping and aggregating EOs like GROUP BY
  • Index(es):
    • Date
    • Thread