-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 6.0.0
-
Component/s: None
-
None
I get an infinite loop running this script that I get in v6.0.0.rc1 but not in the v5.x series.
Was there an intended behavior change here? I couldn't find anything to that effect, but this seems like a reasonable use-case.
```ruby
require 'mongoid'
Mongoid.configure do |config|
config.connect_to('foo_test')
end
puts Mongoid::VERSION # => 6.0.0.rc0
class Band
include Mongoid::Document
has_many :members
after_save :create_member
def create_member
members.create!(name: 'Ben')
end
end
class Member
include Mongoid::Document
field :name, type: String
belongs_to :band
end
Band.create!
```