File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -544,6 +544,27 @@ User.where(name: 'Mike').where('name.begins_with': 'Ed')
544544
545545the first one will be ignored and the last one will be used.
546546
547+ ** Warning:** There is a caveat with filtering documents by ` nil `
548+ value attribute. By default Dynamoid ignores attributes with ` nil `
549+ value and doesn't store them in a DynamoDB document. This behavior
550+ could be changed with ` store_attribute_with_nil_value ` config option.
551+
552+ If Dynamoid ignores ` nil ` value attributes ` null ` /` not_null ` operators
553+ should be used in query:
554+
555+ ``` ruby
556+ Address .where(' postcode.null' : true )
557+ Address .where(' postcode.not_null' : true )
558+ ```
559+
560+ If Dynamoid keeps ` nil ` value attributes ` eq ` /` ne ` operators
561+ should be used instead:
562+
563+ ``` ruby
564+ Address .where(' postcode' : nil )
565+ Address .where(' postcode.ne' : nil )
566+ ```
567+
547568#### Limits
548569
549570There are three types of limits that you can query with:
You can’t perform that action at this time.
0 commit comments