On 26 Sep 2007, at 00:50, Gabe da Silveira wrote:
>
> So I'm moving onto promoting http://dev.rubyonrails.org/ticket/9497
> which gathers up the list of tables that are referenced in
> conditions and joins and uses them to restrict what is actually
> joined. Although the diff looks a little confusing due a slight
> refactoring of the methods, in actuality there is less than one
> line of new code here.
Do you mean http://dev.rubyonrails.org/ticket/9560 ?
> a) this patch's correctness is largely defined by the fact that it
> doesn't break other tests which have pretty wide coverage over this
> area of ActiveRecord.
> b) I didn't see offhand a great way to verify the removal of the
> joins.
>
I may be reading incorrectly, but is it the case that if you were to
have
class A
has_one :b
end
class B
has_one :c
end
and you did
A.find(:all, :include => {:b => :c}, :conditions => "cs.foo = bar")
then this would try and only join c (even though you need to go
through b to get to c) ? No clue whether this is useful or not ( I
could even be doing it myself)
Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---