# File lib/dm-core/collection.rb, line 630 def replace(other) other = other.map do |resource| if resource.kind_of?(Hash) new(resource) else resource end end if loaded? resources_removed(self - other) end super(resources_added(other)) end