单程方向,风帆和mongodb

我有个问题。 我觉得我做错了什么。

我有两个模型:tutorType和学生。

这是我的学生

module.exports = { attributes: { tutor1Name:'string', tutor1Type: { model: 'tutorType' }, contact: { type: 'numeric' }, } }; 

这是我的TutorType

 module.exports = { attributes: { libelle: "string" } }; 

我使用预定义的蓝图来插入。 当我插入一个新学生时,我有返回的响应:

 { "name": "Luke", "tutor1Type": "Biological", "createdAt": "2015-07-13T17:57:12.526Z", "updatedAt": "2015-07-13T17:57:12.526Z", "id": "55a3fbf8c9e93bf0266a63a8" } 

应该tutor1Type是一个对象,而不是一个string? 其实,我可以把我想要的string。 我希望能够把我在TutorType与我的学生的外键只有行。

我做什么错了?

编辑

只需在我的数据库中添加一下。 当我发送tutorType的ID到我的控制器。 它在db中添加一个“Object(hashID)”。 我认为这是一个好消息。

事情是,我也可以插入不是我的tutorListstring…我不明白如何正直工作在这里…

有任何想法吗?!