lib/dm-tokyo-adapter/query.rb in shanna-dm-tokyo-adapter-0.3.0 vs lib/dm-tokyo-adapter/query.rb in shanna-dm-tokyo-adapter-0.3.1
- old
+ new
@@ -76,11 +76,11 @@
end
end
def comparison_statement(statements, comparison, affirmative = true)
value = comparison.value
- primitive = comparison.property.primitive
+ primitive = comparison.subject.primitive
if value.kind_of?(Range) && value.exclude_end?
operation = BooleanOperation.new(:and,
Comparison.new(:gte, comparison.property, value.first),
Comparison.new(:lt, comparison.property, value.last)
@@ -99,10 +99,10 @@
when GreaterThanOrEqualToComparison then :gte
when LessThanOrEqualToComparison then :lte
else fail_native("Comparison #{comparison.slug}'.") && return
end
- statements.add(comparison.property.field, operator, quote_value(value), affirmative)
+ statements.add(comparison.subject.field, operator, quote_value(value), affirmative)
end
def quote_value(value)
"#{value}"
end