Displaying 1 result from an estimated 1 matches for "replacement_id".
Did you mean:
placement_id
2006 Jun 23
1
Describing a "replaces" relationship within the same model
...ionships between two objects of a
model, where one of the objects replaces the other. I want to be able
to tell if one object has been replaced and, if so, by what object; and
vice versa what object an object replaces, if any. My idea was the
following:
create_table :events do |t|
t.column :replacement_id, :integer
t.column :description, :text, :null => false
end
create_table :replacements, {:id => false} do |t|
t.column :original_id, :integer, :null => false
t.column :new_id, :integer, :null => false
t.column :date, :date, :null => false
end
Is this a reasonable model and,...