SoftwareBrothers / adminjs-typeorm

TypeORM adapter for AdminJS
MIT License
24 stars 32 forks source link

Support M:N relation #68

Open CodeXiD opened 7 months ago

CodeXiD commented 7 months ago

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

dziraf commented 7 months ago

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.