我正在尝试使用sails-orientdb更新一行,这样:
CommentModel.update({
_id: req.body.reply.commentId
}, comment).exec(function (err, reply) {
// *** LOG: LOOK BELOW
console.log(comment, req.body.reply.commentId, reply);
// ***
if (err)
return next(err);
UserModel.findOne({
id: reply.author
}).exec(function (err, user) {
reply.author = user.toJSON();
res.json({
success: !err,
reply: reply
});
});
});
评论:{作者:'#16:0',节点:'#30:13',_id:'0dcb0fb8-35e9-4117-87e9-33e2ac21e0e0',正文:'lkjnn',回复:'[object Object]',创建时间:'2015-07-21T08:50:52.000Z',更新时间:'2015-07-21T08:50:52.000Z',id:空}
req.body.reply.commentId: 0dcb0fb8-35e9-4117-87e9-33e2ac21e0e0
回复:未定义
但是,我收到此错误消息:
错误 (E_VALIDATION) :: 1 属性无效
请问这个怎么解决?怎么了?