On Sun, Jul 30, 2006 at 04:56:54AM -0400, Sean McBride wrote:
> While using SQLObject, I find myself CONSTANTLY wanting to use Group By 
> in selects for my SQLObject classes. I know that Oleg has mentioned 
> before that Group By's don't make sense in select for a SQL object, but 
> I think they do! As long as you are selecting all of the rows from the 
> table that correspond to the given SQLObject, why should SQLObject care 
> if you are using a Group By or not? It can still take those results and 
> turn them into instances of your SQLObject class if you have selected 
> all of the necessary rows. That's all it should care about.

   I do not understand this. Can you show a brief example? Please write a
SELECT with GROUP BY that selects some or all rows from a table.

> The reason why I want Group By so badly is because there are some 
> orderings that can only be accomplished by using them. Group By changes 
> the behaviou of the accumulation functions that are used in the Order By 
> statement, allowing you to do things like sort by the number of objects 
> joined in a one-to-many or many-to-many relationship, or sort by the 
> latest reply date in a forum.

   Use Select() from SQLBuilder. It has groupBy.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to