Category : nodejs-server

Hi, I’m trying to get a list of products grouped by category id, but I don’t understand how to apply it. These are my entities @Entity() export class Product { @PrimaryGeneratedColumn() id: number; @Column() name: string; @Column() url_image: string; @Column() price: number; @Column() discount: number; @ManyToOne(() => Category, (category) => category.products) category: Category; } @Entity() ..

Read more