Lighthouse has a new layout.
Prefer the old one? Return to the old layout,
and switch back any time from the link at the top of each page.
This project is archived and is in readonly mode.
count ordered assn w/ postgres
#923
Postgres is much stricter than Mysql and barfs if a sql statement has both select count() and an order clause. Unfortunately, if a count_by_sql isn't provided for an association governed by a find_by_sql with an order clause, ActiveRecord will substitute the select clause with count() and neglect to drop the order clause.
We patched our Rails to drop the order clause (by finding the last occurrence of order by). Maybe there's some other reason why this is a bad idea (some SQL code that gets broken by this).
Mostly just making yall aware of the issue...
Reported by Gary Yngve ·
August 28th, 2008 @ 06:01 AM