我正在尝试使用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 ]',createdAt:'2015-07-21T08:50:52.000Z',updatedAt:'2015-07-21T08:50:52.000Z',id:null}
req.body.reply.commentId:0dcb0fb8-35e9-4117-87e9-33e2ac21e0e0
回复:未定义
但是,我收到此错误消息:
错误(E_VALIDATION):: 1属性无效
请问如何解决这个问题?怎么了?