This project is archived and is in readonly mode.

#137 ✓resolved
Frederick Cheung

Assocation preload of has many through discards some attributes

Reported by Frederick Cheung | May 7th, 2008 @ 09:46 PM

When eager loading a has many through association, some attributes are ignored. For example, given

class Author < AR:Base
  has_many :posts
  has_many :comments, :through => :posts, :order => 'created_at desc', :conditions => '...', :include => :author

then Author.find xxx, :include => :comments will not honour the :order, :conditions & :include options, which would have been respected if the comments association was loaded normally

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>