sequelize-ui icon indicating copy to clipboard operation
sequelize-ui copied to clipboard

When creating a many-to-many relationship the relationships stated use different names for through value/join table name

Open jtobinisaniceguy opened this issue 4 months ago • 0 comments

Example:

Chat.belongsToMany(Profile, { as: 'profiles', through: 'chat_profile', foreignKey: 'chatId', otherKey: 'profileId', onDelete: 'CASCADE' })

Profile.belongsToMany(Chat, { as: 'chats', through: 'profile_chat', foreignKey: 'profileId', otherKey: 'chatId', onDelete: 'CASCADE' })

Shouldn't these have the same "through" value for same named join table

jtobinisaniceguy avatar Dec 11 '25 20:12 jtobinisaniceguy