Closed timershaziganshin closed 11 years ago
Complex keys (Origin::Key type) in and (or alias all_of) queries aren't expanding in raw queries correctly. Example:
Origin::Key
and
all_of
class TestCriteria include Origin::Queryable end test_criteria = TestCriteria.new test_criteria.and(:test.elem_match => {:test1.in => ["value1"]})
should build selector
{ "$and"=> [ { "test"=> { "$elemMatch"=> { "test1"=> { "$in"=> ["value1"] } } } } ] }
but builds
{ "$and"=> [ { "test"=> { "$elemMatch"=> { #<Origin::Key:0x007feea0d8c868 @name=:test1, @strategy=:__intersect__, @operator="$in", @expanded=nil, @block=nil>=> ["value1"] } } } ] }
Complex keys (
Origin::Key
type) inand
(or aliasall_of
) queries aren't expanding in raw queries correctly. Example:should build selector
but builds