From 7bec73c063ae8e1e78d39828baa531152ed6e953 Mon Sep 17 00:00:00 2001 From: Ayoub Aarrasse Date: Thu, 6 Nov 2025 15:51:23 +0100 Subject: [PATCH 1/2] correctly handle nil pointer values for nullable columns --- oracle/common.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/oracle/common.go b/oracle/common.go index efcb375..594a117 100644 --- a/oracle/common.go +++ b/oracle/common.go @@ -218,6 +218,10 @@ func convertValue(val interface{}) interface{} { // Dereference pointers rv := reflect.ValueOf(val) + if rv.Kind() == reflect.Ptr && rv.IsNil() { + return nil + } + for rv.Kind() == reflect.Ptr && !rv.IsNil() { rv = rv.Elem() val = rv.Interface() From 6db4177a32e534774be5bac7d3b014f39a33e9ef Mon Sep 17 00:00:00 2001 From: Ayoub Aarrasse Date: Thu, 6 Nov 2025 15:59:22 +0100 Subject: [PATCH 2/2] Unskipping TestBooleanNullableColumn test --- tests/boolean_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/boolean_test.go b/tests/boolean_test.go index cd945b2..f0de85b 100644 --- a/tests/boolean_test.go +++ b/tests/boolean_test.go @@ -259,9 +259,8 @@ func TestBooleanStringCoercion(t *testing.T) { } } - func TestBooleanNullableColumn(t *testing.T) { - t.Skip("Skipping until nullable bool bug is resolved") + // t.Skip("Skipping until nullable bool bug is resolved") DB.Migrator().DropTable(&BooleanTest{}) DB.AutoMigrate(&BooleanTest{})