Re: Grouping and aggregating EOs like GROUP BY
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