Difference between embeds_many and has_many in mongoid

embeds_many is used to store relative documents inside of parent document.

has_many is used to store a relation between documents in separate collections. Relative records of has_many have field that stores id of the parent document.

Leave a Comment