belongs_to :owner, class_name: 'User'
has_many :posts, class_name: 'Classified', inverse_of: :owner
has_and_belongs_to_many :starred, class_name: 'Classified', inverse_of: nil
Ambiguous relations :posts, :starred defined on User.
When Mongoid attempts to set an inverse document of a relation in memory, it needs to know which relation it belongs to. When setting :owner, Mongoid looked on the class Classified for a matching relation, but multiples were found that could potentially match: :posts, :starred.
On the :owner relation on Classified you must add an :inverse_of option to specify the exact relationship on User that is the opposite of :owner.):
Mongoid should not attempt to set the inverse document for the relation 'starred' since we explicitly set it to nil, leaving Mongoid with only one relation to match.