repo.findOneBy({ status: undefined })
repo.findOneBy({ status: null })
SQL 就是全部
SELECT * FROM user
repo.findOneBy({ status: undefined })
// SELECT * FROM user
repo.findOneBy({ status: null })
// SELECT * FROM user WHERE status = null
你可以使用 IsNull()
repo.findOneBy({ status: IsNull() })