Skip to content

Commit f84bb95

Browse files
committed
Readme.md. Added warning about ignored and overwritten ‘where’ conditions
1 parent a61b3c5 commit f84bb95

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,18 @@ u.addresses.where(city: 'Chicago').all
532532

533533
But keep in mind Dynamoid -- and document-based storage systems in general -- are not drop-in replacements for existing relational databases. The above query does not efficiently perform a conditional join, but instead finds all the user's addresses and naively filters them in Ruby. For large associations this is a performance hit compared to relational database engines.
534534

535+
**WARNING:** There is a limitation of conditions passed to `where`
536+
method. Only one condition for some particular field could be specified.
537+
The last one only will be applyed and others will be ignored. E.g. in
538+
examples:
539+
540+
```ruby
541+
User.where('age.gt': 10, 'age.lt': 20)
542+
User.where(name: 'Mike').where('name.begins_with': 'Ed')
543+
```
544+
545+
the first one will be ignored and the last one will be used.
546+
535547
#### Limits
536548

537549
There are three types of limits that you can query with:

0 commit comments

Comments
 (0)