sequelize-auto icon indicating copy to clipboard operation
sequelize-auto copied to clipboard

Computed Columns in MSSQL generated with allowNull: false

Open SuperKXT opened this issue 4 years ago • 2 comments

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.

SuperKXT avatar Nov 09 '21 06:11 SuperKXT

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

steveschmitt avatar Nov 11 '21 07:11 steveschmitt

ColumnName AS Concat("P-", AnotherColumnName)

SuperKXT avatar Nov 11 '21 07:11 SuperKXT