search for: father_id

Displaying 1 result from an estimated 1 matches for "father_id".

Did you mean: farmer_id
2008 May 27
2
HABTM using two columns
...I was wondering whether anyone could guide me to docu and code examples how to create and use a has_and_belongs_to_many relationship with a joining table where TWO columns are used to identify the relation to TWO alternative tables. Example: table 1: mothers [mother_id, name] table 2: fathers [father_id, name] table 3: children [child_id, name] joining table 4: children_parent [child_id, parent_id, parent_type] ''parent type'' can be either ''mother'' or ''father'', and depending on this, the ''parent_id'' links to an entry in eithe...