【发布时间】:2010-07-29 07:43:24
【问题描述】:
我对 referenced_many 和 referenced_in 关系模型有疑问。
我的模型是跟随。
学生references_many mobile_numbers
学生中引用的手机号码
现在当我尝试做 @mobile = MobileNumber.first @mobile.student
它弹出错误说 找不到 ID 为 4c47e74ff1936f05f9000015 的学生班级的文档
并且@mobile 对象具有 student_id : "4c47e74ff1936f05f9000015" 作为其属性之一
我的数据或模型有什么问题吗 谢谢
【问题讨论】:
标签: associations mongoid