sequelize / website

Our beloved website that contains all versions of our documentations and the API references.
https://sequelize.org
29 stars 154 forks source link

Sequelize sourceKey Option Not Recognizing Custom Column Names in Associations #759

Open the-last-php-bender opened 3 months ago

the-last-php-bender commented 3 months ago

Issue Description

<-- When defining associations in Sequelize, the sourceKey option allows specifying the source column to use in the association. However, when using a column other than the primary key (e.g., 'public_key'), the association fails to recognize the specified sourceKey, resulting in an error like "Unknown attribute 'columnName' passed as sourceKey." -->

What was unclear/insufficient/not covered in the documentation

If possible: Provide some suggestion on how we can enhance the docs

Additional context

<-- Add any other context or screenshots about the issue here. -->

Screenshot (123)