Say I have tasks with a belongs_to association to categories where the later act as a nested set. Now I want to find all tasks belonging to a specific category (given as primary key) or any of its sub-categories. SELECT tasks.*, tasks_category.name FROM categories AS nested_set_categories, tasks LEFT OUTER JOIN categories AS tasks_category ON tasks_category.id = tasks.category_id WHERE (parent.id = ?) AND (tasks_category.lft BETWEEN nested_set_categories.lft AND nested_set_categories.rgt) (The aliases in this snippets require a patch for ActiveRecord; see <http://dev.rubyonrails.org/ticket/1907>.) Unless I''m mistaken, this kind of query is not currently supported by AR#find. Of course, I could write this SQL manually, but that''s not what I want. Therefore I intend to write a patch to enhance find. I''m not sure about the "user interface", however. My current best idea is Task.find(:all, :belongs_to => [:category, record_or_id]) Any suggestions? Michael -- Michael Schuerig The Fifth Rider of the Apocalypse mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org is a programmer. http://www.schuerig.de/michael/