Having a table with a column called ID that is only part of the primary key really doesn't work as rails likes to treat ID as a special name so it becomes impossible to assign to it or read it.
9 lines
312 B
Ruby
9 lines
312 B
Ruby
class OldWayNode < ActiveRecord::Base
|
|
set_table_name 'way_nodes'
|
|
set_primary_keys :way_id, :version, :sequence_id
|
|
|
|
belongs_to :old_way, :foreign_key => [:way_id, :version]
|
|
# A bit messy, referring to current nodes and ways, should do for the data browser for now
|
|
belongs_to :node
|
|
belongs_to :way
|
|
end
|