We use inverse_of in three ways in Mongoid. I've attempted to translate the way we currently use inverse_of in Mongoid to the @bkeepers inverse_of syntax:
- Update: use :class_name to specify the class and :inverse_of to specify the inverse association if the :class_name and :inverse_of association can not be inferred from the association definition.
To declare multiple associations to the same model.
I believe :inverse_of and :class_name can be inferred in the trivial case where the field name equals the class or collection name.