lib/dynamoid/associations/many_association.rb in dynamoid-edge-1.1.1 vs lib/dynamoid/associations/many_association.rb in dynamoid-edge-1.1.2
- old
+ new
@@ -143,11 +143,13 @@
#
# @return [Dynamoid::Association] the association this method was called on (for chaining purposes)
#
# @since 0.2.0
def where(args)
- args.each {|k, v| query[k] = v}
- self
+ filtered = clone
+ filtered.query = query.clone
+ args.each {|k, v| filtered.query[k] = v}
+ filtered
end
# Is this array equal to the association's records?
#
# @return [Boolean] true/false