lib/mongoid/contextual/mongo.rb in mongoid-5.0.2 vs lib/mongoid/contextual/mongo.rb in mongoid-5.1.0
- old
+ new
@@ -541,9 +541,15 @@
apply_option(name)
end
if criteria.options[:timeout] == false
@view = view.no_cursor_timeout
end
+ if criteria.options[:cursor_type]
+ # @todo: update to use #cursor_type method on view when driver 2.3 is released.
+ # See RUBY-1080
+ @view = view.clone
+ @view.options.merge!(cursor_type: criteria.options[:cursor_type])
+ end
end
# Apply an option.
#
# @api private