Nestjs, Transactions, Dependency Injection, Repository Pattern, Repository Design Pattern.
this.getRepository(Order).find({ relations: { items: { product: true, }, }, }); } async createOrder(orderNo: string) { const ordersRepository = this.getRepository(Order); const order = ordersRepository.create({ date: new Date(), orderNo: orderNo, }); await ordersRepository.insert(order); return