Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谁能向我解释一下embeds_many和之间has_many的区别?
embeds_many
has_many
embeds_many用于在父文档中存储相关文档。
has_many用于将文档之间的关系存储在单独的集合中。has_many存储父文档 id 的 has 字段的相对记录。