Displaying 1 result from an estimated 1 matches for "findpkg".
Did you mean:
finding
2006 Feb 10
1
Auto-generated find queries adding bogus WHERE clauses
[Sorry for the poor subject; this is really hard to explain]
I''m trying to run a search over several objects which themselves contain
multiple model objects, like so:
class Collection << ActiveRecord::Base
def findpkg
self.repositories.each do |r|
p = r.packages.find(:all, :conditions => "name like ''%pkg%''")
end
end
end
Unfortunately, AR proceeds to generate SQL that looks like this:
Package Load (0.000548) SELECT * FROM packages WHERE
(packages.repository...