Closed closingin closed 4 years ago
I'm not sure it's related but tasks look to be displayed in a bad way. Could you try it on your end?
@larcin Pulling forestadmin-server made it work as it used to, it's ok for me!
:tada: This PR is included in version 3.6.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Fixes #4embh7.
This PR contains to bug fixes in order to correctly handle snake_cased tables that only contain foreign keys.
The issue came from two different bugs in the code :
through
property that is generated when havingbelongsToMany
relationships was using the table name as its value, but it's meant to contain the name of the model, which is camelCased in our setup.options.underscored
property was only computed from the fields names, so if you had no fields but had some snake_cased FKs, it still defaulted to false.The consequence was that in the schema building step, after having generated your project, Sequelize couldn't find the snake_cased model in the
through
property, and as such created it on its own (which is its normal behaviour) with default values (such as createdAt and updatedAt).From the documentation :
Pull Request checklist: