嘿嘿,
\n我正在尝试使用 NestJS + TypeORM 为某种类型的电子商务网站构建后端。
\n我需要我的订单和产品表之间的 am:n 关系。然而,由于我需要数据透视表中的一些自定义字段,我查找了 typeorms 文档,并且如上所述,我需要创建一个我完成的新实体。现在我在启动 NestJS 应用程序时遇到错误:
\nError: Entity metadata for Product#productToOrders was not found. Check if you specified a correct entity object and if it\'s connected in the connection options.\nRun Code Online (Sandbox Code Playgroud)\n我的产品.entity.ts:
\nError: Entity metadata for Product#productToOrders was not found. Check if you specified a correct entity object and if it\'s connected in the connection options.\nRun Code Online (Sandbox Code Playgroud)\n我的productToOrder.entity.ts
\nimport { BaseEntity, Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";\nimport …Run Code Online (Sandbox Code Playgroud)