Node.js sails v1中无法识别的修饰符“%u bsontype”
我正在尝试将我的sails.js应用程序从v0.12升级到v1。升级后,以下查询不再工作Node.js sails v1中无法识别的修饰符“%u bsontype”,node.js,sails.js,waterline,Node.js,Sails.js,Waterline,我正在尝试将我的sails.js应用程序从v0.12升级到v1。升级后,以下查询不再工作 return Passport.findOne({ protocol: 'local', user: user.id // also tested user instead of user.id }) 我得到以下错误: { UsageError: Invalid criteria. Details: Could not use the provided `where`
return Passport.findOne({
protocol: 'local',
user: user.id // also tested user instead of user.id
})
我得到以下错误:
{ UsageError: Invalid criteria.
Details:
Could not use the provided `where` clause. Could not filter by `user`: Unrecognized modifier (`_bsontype`) within provided constraint for `user`.
}
提前感谢您提供的相关帮助。看起来findOne不喜欢_bsontype属性,而应该是普通字符串 这行不通
// Fetch the user associated with the Passport
return User.findOne({ id: passport.user });
但这很管用
// Fetch the user associated with the Passport
return User.findOne({ id: passport.user + '' });
你找到这个问题的答案了吗?@ShashanSooriyahetti nope,由于问题跳过了迁移。这对我们来说不值得努力。