Included into comparisons which are capable of supporting Relationships.
Returns the conditions required to match the subject relationship
@return [Hash]
@api semipublic
# File lib/dm-core/query/conditions/comparison.rb, line 470 def foreign_key_mapping relationship = subject.inverse relationship = relationship.links.first if relationship.respond_to?(:links) Query.target_conditions(value, relationship.source_key, relationship.target_key) end
Tests that the record value matches the comparison
@param [Resource, Hash] record
The record containing the value to be matched
@return [Boolean]
@api semipublic
# File lib/dm-core/query/conditions/comparison.rb, line 457 def matches?(record) if relationship? && expected.respond_to?(:query) match_relationship?(record) else super end end
Generated with the Darkfish Rdoc Generator 2.