+
+ has_many :old_way_nodes
+ has_many :ways_via_history, :class_name=> "Way", :through => :old_way_nodes, :source => :way
+
+ has_many :containing_relation_members, :class_name => "RelationMember", :as => :member
+ has_many :containing_relations, :class_name => "Relation", :through => :containing_relation_members, :source => :relation, :extend => ObjectFinder
+
+ validates_presence_of :id, :on => :update
+ validates_presence_of :timestamp,:version, :changeset_id
+ validates_uniqueness_of :id
+ validates_inclusion_of :visible, :in => [ true, false ]
+ validates_numericality_of :latitude, :longitude, :changeset_id, :version, :integer_only => true
+ validates_numericality_of :id, :on => :update, :integer_only => true
+ validate :validate_position
+ validates_associated :changeset
+
+ # Sanity check the latitude and longitude and add an error if it's broken