It appears that cyclic embeds are interfering with mongoid's ability to interface with mongo when inheritance is involved.
Example:
Place.rb
class Places::Place include Mongoid::Document include Mongoid::Timestamps store_in collection: "places" field :name, type: String, recursively_embeds_one end class Places::BurgerJoint < Places::Place end
In prior versions of mongoid, we were able to query the database and access the `child_place` as expected on both `Places::Place` and `Places::BurgerJoint`. Now when querying the database, nothing happens.
Console.rb
Mongo::Logger.logger = Logger.new($stdout) Mongoid.logger=Logger.new($stdout) Places::Place.first => nil
Note the complete lack of logging, queries, etc.
However, if we remove `recursively_embeds_one`, then all is well.
Console.rb
Mongo::Logger.logger = Logger.new($stdout) Mongoid.logger=Logger.new($stdout) Places::Place.first => D, [2017-01-24T15:12:07.145000 #38947] DEBUG -- : MONGODB | Topology type 'unknown' initializing. D, [2017-01-24T15:12:07.157000 #38947] DEBUG -- : MONGODB | Server localhost:27017 initializing. D, [2017-01-24T15:12:07.255000 #38947] DEBUG -- : MONGODB | Topology type 'unknown' changed to type 'single'. D, [2017-01-24T15:12:07.256000 #38947] DEBUG -- : MONGODB | Server description for localhost:27017 changed from 'unknown' to 'standalone'. D, [2017-01-24T15:12:07.257000 #38947] DEBUG -- : MONGODB | There was a change in the members of the 'single' topology. D, [2017-01-24T15:12:07.328000 #38947] DEBUG -- : MONGODB | localhost:27017 | sitata_development.find | STARTED | {"find"=>"places", "filter"=>{}, "limit"=>1, "singleBatch"=>true} D, [2017-01-24T15:12:07.339000 #38947] DEBUG -- : MONGODB | localhost:27017 | sitata_development.find | SUCCEEDED | 0.009999999999999998s => #<Places::BurgerJoint _id: 54f35e5528bfd49851000791, etc.. >