def replace(other_array)
      original_target = load_target.dup
      other_array.each { |val| raise_on_type_mismatch!(val) }
      target_ids = reflection.options[:target_ids]
      owner[target_ids] = other_array.map(&:id)

      old_records = original_target - other_array
      old_records.each do |record|
        @target.delete(record)
      end

      other_array.each do |record|
        if index = @target.index(record)
          @target[index] = record
        else
          @target << record
        end
      end
    end
def replace(other_array)
      original_target = load_target.dup
      other_array.each { |val| raise_on_type_mismatch!(val) }
      target_ids = reflection.options[:target_ids]
      owner[target_ids] = other_array.map(&:id)

      old_records = original_target - other_array
      old_records.each do |record|
        @target.delete(record)
      end

      other_array.each do |record|
        if index = @target.index(record)
          @target[index] = record
        else
          @target << record
        end
      end
    end
full replace simplely