+
+ def save_with_dependencies!
+ save!
+ #not sure whats going on here
+ clear_aggregation_cache
+ clear_association_cache
+ #ok from here
+ @attributes.update(OldNode.find(:first, :conditions => ['id = ? AND timestamp = ?', self.id, self.timestamp]).instance_variable_get('@attributes'))
+
+ self.tags.each do |k,v|
+ tag = OldNodeTag.new
+ tag.k = k
+ tag.v = v
+ tag.id = self.id
+ tag.version = self.version
+ tag.save!
+ end
+ end
+
+ def tags
+ unless @tags
+ @tags = Hash.new
+ OldNodeTag.find(:all, :conditions => ["id = ? AND version = ?", self.id, self.version]).each do |tag|
+ @tags[tag.k] = tag.v
+ end
+ end
+ @tags = Hash.new unless @tags
+ @tags
+ end
+
+ def tags=(t)
+ @tags = t
+ end
+
+ def tags_as_hash
+ hash = {}
+ Tags.split(self.tags) do |k,v|
+ hash[k] = v
+ end
+ hash
+ end
+
+ # Pretend we're not in any ways
+ def ways
+ return []
+ end
+
+ # Pretend we're not in any relations
+ def containing_relation_members
+ return []
+ end