类别.ts
@Entity('categoryenter code here')
export class Category{
@PrimaryGeneratedColumn({ type: 'int' })
id: Category;
@OneToMany(() => Category, category => category.category,{eager:true})
categoryList: Category[];
@ManyToOne(() => Category, (category) => category.categoryList)
category: Category;
}
Run Code Online (Sandbox Code Playgroud)
类别实体在上面(mysql)。我想找到一个包含所有这样子项的类别
await categoryRepo.findOne({
where:{ id: 1 },
relations:['categoryList']
})
Run Code Online (Sandbox Code Playgroud)
但我得到了一个错误Maximum call stack size exceeded
我该怎么办