Skip to content

Commit c6f50cd

Browse files
datatable column allows null if there is default constraint as well (was originally handled in serialization of columns by coalescing both boolean in the serialized format)
1 parent d9ccc8f commit c6f50cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SqlClient/Shared.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ module RuntimeInternals =
232232
let primaryKey = ResizeArray()
233233
for column in columns do
234234
let col = new DataColumn(column.Name,column.TypeInfo.ClrType)
235-
col.AllowDBNull <- column.Nullable
235+
col.AllowDBNull <- column.Nullable || column.HasDefaultConstraint
236236
col.ReadOnly <- column.ReadOnly
237237
col.AutoIncrement <- column.Identity
238238

0 commit comments

Comments
 (0)