apstanisic / zmaj

Zmaj is a headless CMS for managing database
https://zmaj.vercel.app
MIT License
5 stars 0 forks source link

Sequelize does not support 2 relations with same table #40

Closed apstanisic closed 1 year ago

apstanisic commented 1 year ago

I can't have 2 relations to the same table. For example:

posts.mainAuthor -> authors.id
posts.secondAuthor -> authors.id

This breaks app, since Zmaj can't initialize relations. At very least, wrap generating relations in try/catch, and on error, create models without relations

apstanisic commented 1 year ago

Switched to v6 stable for now. It looks like v7 stable won't come soon