-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
Mongoid::Document#an_association(true) does not reload the related documents in mongoid 3.0.1. Both with and without identity map.
class A include Mongoid::Document has_and_belongs_to_many :bs, inverse_of: :as end class B include Mongoid::Document has_and_belongs_to_many :as, inverse_of: :bs end A.delete_all; B.delete_all a = A.create puts a.bs.size # => 0 B.create(:a_ids => [a.id]) puts a.bs.size # => 0 puts a.bs(true).size # => still 0! a = A.first puts a.bs.size # => 1
Possibly a regression of MONGOID-597?