Find statement and ':group => ' udage ....

David Marko wrote:

I have following statement in controller:

Sale.find(:all,:conditions => ["users.team_id IN (?)", Team.teams_ids(id)], :include => [:user], :group => "sales.stage_id")

... but when looking to log the 'group by' is not generated in SQL 'select' statement so no grouping occures in resultset. Are there any special conditions for using ':group' in find statement?

You can't use :group if you also use :include. You can use :order,
if that's what you intended.