def match_unique_object_with_attributes(others, attributes)
      vh = value_hash(attributes)
      return if vh.empty? or vh.size < attributes.size
      matches = others.select do |other|
        self.class == other.class and
          vh.all? { |pa, v| other.matches_attribute_value?(pa, v) }
      end
      matches.first if matches.size == 1
    end
def match_unique_object_with_attributes(others, attributes)
      vh = value_hash(attributes)
      return if vh.empty? or vh.size < attributes.size
      matches = others.select do |other|
        self.class == other.class and
          vh.all? { |pa, v| other.matches_attribute_value?(pa, v) }
      end
      matches.first if matches.size == 1
    end
Returns the object in others which uniquely matches this domain object on the given attributes,
 or nil if there is no unique match. This method returns nil if any attributes value is nil.