Module: Mongoid::Locking::Association::Embedded::Batchable

Defined in:
lib/mongoid/locking/association/embedded/batchable.rb

Overview

:nodoc:

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#selectorHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Get the selector for executing atomic operations on the collection.


Mongoid memoizes the atomic selector, which is not compatible with Mongoid::Locking. For subsequent saves, the lock_version needs to be updated, so the atomic selector needs to be regenerated.

Examples:

Get the selector.

batchable.selector

Returns:

  • (Hash)

    The atomic selector.

Since:

  • 3.0.0



22
23
24
# File 'lib/mongoid/locking/association/embedded/batchable.rb', line 22

def selector
  _base.atomic_selector
end