我尝试使用
id
就像在typeorm文档中解释的那样,但出现此错误:
form-check
答案 0 :(得分:1)
我认为您的示例仅适用于SQL数据库。对于mongo,您需要在where条件中添加运算符$or
或$and
:
userRepository.find({
where: {
$or: [
{
email: 'giberish@gmail.com',
},
{
username: 'thisismyusername',
},
]
}
});