Mysql – How to get the users with latest post in a single query in typeorm
I am using nest.js + typeorm + mySql here are my entities @Entity() export class User { @PrimaryGeneratedColumn('uuid') id: string @Column() name: string @OneToMany(() => Post, post => post.user) posts: Post[] } @Entity() export class Post { @PrimaryGeneratedColumn('uuid') id: string…