MongoDB Mongoid 中只设置 belongs_to 忽略 has_many 会有严重问题吗?

mingmingpao · 2015年04月09日 · 最后由 dddd1919 回复于 2015年04月10日 · 6946 次阅读

看文档中有这么一句

Definitions are required on both sides to the relation in order for it to work properly, unless one of the models is embedded.

如果我忽略 has_many 会怎样?因为不需要从 one 端获取 many 端

不会(没发现问题)

需要 登录 后方可回复, 如果你还没有账号请 注册新账号