Displaying 1 result from an estimated 1 matches for "foo_metadata".
Did you mean:
f_metadata
2007 Mar 09
0
Eager loading with inheritance
...utes, two child models with
different attributes, and a module that contains shared functionality
for the child models.
The issue arises in creating associations with other models when it is
necessary to provide conditions on the association, for example:
has_many :foos, :conditions => "foo_metadata.created_at <
#{Time.now}",
:order => ''foo.bar DESC,
foo_metadata.baz''
I can use eager loading to include the foo_metadata relationship,
however, this becomes cumbersome and difficult to manage throughout
the application. Is there an...