Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
:)
我正在尝试使用文件中的代码测试我的实体操作。我正在创建一个 userRepository 对象,如下所示 :
当我从存储库中进行 console.log find{} 时,它会获取以前存储的记录: image 我使用 faker 创建了一个虚拟对象,它工作正常,但是一旦我尝试在 DB 中创建它或将其持久化,它似乎没有工作: 在此处输入图像描述
我也试过 orm.em.persist。如果需要更多详细信息,请告诉我。
仅针对未来的读者,这已在 GH 上被询问和回答。
https://github.com/mikro-orm/mikro-orm/discussions/1571