Displaying 1 result from an estimated 1 matches for "repository_id".
2006 Feb 10
1
Auto-generated find queries adding bogus WHERE clauses
...ef 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_id = 3 AND (name like ''%pkg%''))
Package Load (0.000167) SELECT * FROM packages WHERE
(packages.repository_id = 4 AND (packages.repository_id = 3
AND (name like ''%pkg%'')))
Package Load (0.000151) SELECT * FROM packages WHERE
(packages.repository...