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.

Joe Hannon's latest activity

Tuesday, May 04 2010
4361 has_many through self join does not include table alias, so fails was updated in Ruby on Rails
  • Joe Hannon
    Joe Hannon commented at 4:59 PM

    Ernie's patch fixes the issue. Has many through self joins are now working in the unit test, as well as my example schemata above. Ernie's patch also fixes a co...

Monday, May 03 2010
4361 has_many through self join does not include table alias, so fails was updated in Ruby on Rails
  • Joe Hannon
    Joe Hannon commented at 6:00 PM

    Rather, this bug is present in rails 2.3.5 as well as edge (3.0.0beta3)

  • Joe Hannon
    Joe Hannon commented at 6:00 PM

    This but is present in rails 2.3.5 as well as edge (3.0.0beta3)

  • Joe Hannon
    Joe Hannon commented at 12:27 AM

    here's that patch for the unit test

Sunday, May 02 2010
4361 has_many through self join does not include table alias, so fails was updated in Ruby on Rails
  • Joe Hannon
    • Tag set to patch, unit
    by Joe Hannon at 8:27 PM

    I've attached a patch which adds a unit test to rails/activerecord/test/cases/associations/has_many_through_associations_test.rb:

      def test_has_many_associati...
Monday, April 26 2010
4361 has_many through self join does not include table alias, so fails was updated in Ruby on Rails
  • Joe Hannon
    Joe Hannon commented at 4:55 PM

    Let's try that again with formatting

    Here's a simpler schema with no STI:
    db/schema.rb:

    ActiveRecord::Schema.define(:version => 20100426070714) do
    
      create_ta...
  • Joe Hannon
    Joe Hannon commented at 4:50 PM

    Here's a simpler schema with no STI:

    db/schema.rb:

    ActiveRecord::Schema.define(:version => 20100426070714) do

    create_table "employees", :force => true do |t|

    t...
Saturday, April 10 2010
4361 has_many through self join does not include table alias, so fails was updated in Ruby on Rails
  • Joe Hannon
    Joe Hannon commented at 8:34 AM

    My naive hardcoded sql didn't work. :-(

  • Joe Hannon
    Joe Hannon commented at 8:34 AM

    I think I found the offending line. activerecord-2.3.5/lib/active_record/associations/has_many_through_association.rb, line 172, in HasManyThroughAssociation#co...

  • Joe Hannon
    Joe Hannon created the ticket at 7:47 AM

    Using Rails 2.3.5

    I have a has_many :through association where there is only one table. So the owner model, the through model, and the target model are all the ...