-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: 7.3.0
-
Component/s: None
-
None
-
Fully Compatible
Hi!
Given the following models:
class User include Mongoid::Document field :email, type: String embeds_one :profile, class_name: 'Profile' end class Profile include Mongoid::Document field :bio, type: String end
Calling this will work
User.last.profile.bio #=> "This is a bio" {code:ruby} but calling this will fail {code:ruby} User.whitout(:email).last.profile.bio #=> ActiveModel::MissingAttributeError: Missing attribute: 'bio'
Is this the expected behavior or a bug? It worked with mongoid v6 but no longer does in v7.
Thanks