Displaying 1 result from an estimated 1 matches for "sisters_peopl".
Did you mean:
sisters_people
2007 Jan 03
3
Self-referential habtm with condition is broken
...erence to column
has_and_belongs_to_many :sisters,
:class_name => ''Person'', :join_table => ''relatives'',
:foreign_key => ''from_id'', :association_foreign_key => ''to_id'',
:conditions => "sisters_people.gender = ''f''"
# ^ qualified reference to column
end
The noteworthy things about it are that its habtm associations are
self-referential and that two of them have conditions. Let''s see how to
use this. Also, the brothers and sisters associat...