[英]Type 'number' has no properties in common with type 'FindOneOptions<Client>'
According to the TypeORM docs you need to call findOne
like this (assuming clientId
is also the name of the column in the Client
table).根据TypeORM 文档,您需要像这样调用
findOne
(假设clientId
也是Client
表中列的名称)。
const client = await Client.findOne({
where: {
clientId: clientId
}
});
The error message is telling you that it is expecting a FindOneOptions<Client>
but you are giving it a number
instead.错误消息告诉您它需要一个
FindOneOptions<Client>
但您却给它一个number
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.