From 724e9001a66b1e29e4a6063155bc3fc2faee0c10 Mon Sep 17 00:00:00 2001 From: a631807682 <631807682@qq.com> Date: Fri, 17 Feb 2023 16:00:24 +0800 Subject: [PATCH] fix: empty rel value --- scan.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scan.go b/scan.go index 30841814..736db4d3 100644 --- a/scan.go +++ b/scan.go @@ -96,8 +96,8 @@ func (db *DB) scanIntoStruct(rows Rows, reflectValue reflect.Value, values []int relValue.Set(reflect.New(relValue.Type().Elem())) joinedNestedSchemaMap[fullRelsName] = nil } - currentReflectValue = relValue } + currentReflectValue = relValue } if !isNilPtrValue { // ignore if value is nil