jjzjj

investmentRepository

全部标签

mongodb - TypeORM FindById 不适用于 MongoDB

我正在尝试将TypeORM与MongoDB和express结合使用,但我在基本方面遇到了问题。我刚刚为实体创建了一个具有基本CRUD操作的Controller。方法save、findAll和findbyFilter工作正常,但我无法使需要mongoid的方法工作。router.get("/",async(req:Request,res:Response)=>{constinvestmentRepository=getMongoRepository(Investment);constinvestments=awaitinvestmentRepository.find();res.send