I''m creating an advanced search form and I have to filter the results based on whether particular rows exist in other tables. For example: Project has_many ResearchProjects Project.find(:all, :joins => "INNER JOIN research_projects_vw ON research_projects_vw.fin_project_id = project_totals_vw.fin_project_id", :conditions => ["research_projects_vw.funding_type_code in (?)", ns[''funding_types''].split('','')]) Is there a good way of preventing getting a Cartesian product using this join, or should i just be providing an option like :select => ''distinct fielda, distinct fieldb'' etc -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---