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.

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
    ReggieB commented at 11:26 AM

    Jeff,

    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
    ReggieB commented at 9:11 AM

    The last SQL is:

    
    SELECT count(*) FROM (
      SELECT  *
      FROM `articles`
      INNER JOIN `articles_categories` ON `articles`.id =
    `articles_categories`.article_id
     ...
  • ReggieB
    ReggieB created the ticket at 9:04 AM

    It'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...