lib/lockbox/migrator.rb in lockbox-1.3.3 vs lib/lockbox/migrator.rb in lockbox-1.4.0
- old
+ new
@@ -1,9 +1,9 @@
module Lockbox
class Migrator
def initialize(relation, batch_size:)
@relation = relation
- @transaction = @relation.respond_to?(:transaction)
+ @transaction = @relation.respond_to?(:transaction) && !mongoid_relation?(base_relation)
@batch_size = batch_size
end
def model
@model ||= @relation