From c552deb0cdec9bed19033d53c9e53103bf56d70c Mon Sep 17 00:00:00 2001 From: "Andrey.Tarashevskiy" Date: Sun, 5 Dec 2021 15:19:25 +0300 Subject: [PATCH] optReference column should allow update { it[column] = nullableValue } #1275 / Fix test on SQLServer --- .../jetbrains/exposed/sql/tests/shared/dml/InsertTests.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exposed-tests/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/dml/InsertTests.kt b/exposed-tests/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/dml/InsertTests.kt index d3ed8b3ad5..34211eb941 100644 --- a/exposed-tests/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/dml/InsertTests.kt +++ b/exposed-tests/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/dml/InsertTests.kt @@ -537,10 +537,13 @@ class InsertTests : DatabaseTestsBase() { val boardId = EntityTests.Boards.insertAndGetId { it[name] = UUID.randomUUID().toString() } + val categoryId = EntityTests.Categories.insert { + it[title] = "Category" + }[EntityTests.Categories.uniqueId] val id2 = EntityTests.Posts.insertAndGetId { it[board] = Op.nullOp() - it[category] = null + it[category] = categoryId it[board] = boardId.value } }