adminjs-typeorm icon indicating copy to clipboard operation
adminjs-typeorm copied to clipboard

Support M:N relation

Open CodeXiD opened this issue 1 year ago • 1 comments

Hello, thank you for your work, it is very valuable to us. I would like to know if there are plans to support M:N relation. I know that this can be done through the "relations" package, but you need to create an intermediate table yourself. It would be very cool if it were possible to describe the connection in a simple way

@ManyToMany(() => Category)
@JoinTable()
categories: Category[]

I probably would have sent this issue to the "relations" package, but as I understand it is closed) Thanks for any comment

CodeXiD avatar Feb 27 '24 12:02 CodeXiD

AdminJS requires an actual model for junction table to run queries and this kind of model isn't generated automatically by TypeORM. The same applies to other ORMs.

dziraf avatar Feb 27 '24 17:02 dziraf