Skip to content

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

@jtobinisaniceguy

Description

@jtobinisaniceguy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions