ReggieB
Not a member
ReggieB's latest activity
Tuesday, February 15 2011
6429
limit is ignored with has_and_belongs_to_many and count
was updated
in Ruby on Rails
-
ReggieB commented at 11:26 AMJeff,
The problem does occur within a simpler SQL query. However, it only seems to become an ActiveRecord issue if there is a join involved. For example
Articl...
Monday, February 14 2011
6429
limit is ignored with has_and_belongs_to_many and count
was updated
in Ruby on Rails
-
ReggieB commented at 9:11 AMThe last SQL is:
SELECT count(*) FROM ( SELECT * FROM `articles` INNER JOIN `articles_categories` ON `articles`.id = `articles_categories`.article_id ... -
ReggieB created the ticket at 9:04 AMIt's easiest to use an example to explain the problem:
class Articles has_and_belongs_to_many categories end class Category has_and_belongs_to_many articl...