Ignore model-level validation when creating through table using string (#5556)
* Ignore model-level validation when creating join table for n:m associations. When declaring a join table with the through option declared as a string, Sequelize creates the through model at runtime, and copies the model validation rules from the source table into the through model. More often than not, the model validation rules from the source table would be inappropriate/undesirable for the join table (since their data fields are different anyway). It's also worth noting that if a through model is given, this behavior is not exhibited. * Added unit test for issue #5556.
Showing
with
20 additions
and
1 deletions
-
Please register or sign in to post a comment