Skip to content

Commit

Permalink
fix get vs ad_hoc query choice
Browse files Browse the repository at this point in the history
If you did a query where the only condition was
based on the key it would always try to do a get,
even if the condition was checking against an
array of values.  When it is an array it should
fall back to ad_hoc.
  • Loading branch information
Wesley Beary committed Sep 17, 2008
1 parent 41ee4f1 commit 15be67b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions adapters/dm-couchdb-adapter/lib/couchdb_adapter.rb
Expand Up @@ -201,6 +201,7 @@ def build_request(query)
elsif query.conditions.length == 1 &&
query.conditions.first[0] == :eql &&
query.conditions.first[1].key? &&
query.conditions.first[2].length == 1
!query.conditions.first[2].is_a?(String)
get_request(query)
else
Expand Down

0 comments on commit 15be67b

Please sign in to comment.