sequelize / sequelize-auto

Automatically generate bare sequelize models from your database.
2.88k stars 522 forks source link

Computed Columns in MSSQL generated with allowNull: false #565

Open SuperKXT opened 2 years ago

SuperKXT commented 2 years ago

I have a computed columns in one of my tables and it is being generated with allowNull: false. Since I don't send a value for this column, I end up with a validation error. I can solve this by setting allowNull to true manually but it will need to be done every time I regenerate models.

steveschmitt commented 2 years ago

Thanks for reporting. What is the column definition for your computed column?

SuperKXT commented 2 years ago

ColumnName AS Concat("P-", AnotherColumnName)