File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -896,7 +896,7 @@ func (field *Field) setupValuerAndSetter() {
896896 if ! reflectV .IsValid () {
897897 field .ReflectValueOf (ctx , value ).Set (reflect .New (field .FieldType ).Elem ())
898898 } else if reflectV .Kind () == reflect .Ptr && reflectV .IsNil () {
899- if field .FieldType .Elem ().Kind () == reflect .Array {
899+ if field .FieldType .Elem ().Kind () == reflect .Array && field . OwnerSchema == nil {
900900 field .ReflectValueOf (ctx , value ).Set (reflectV )
901901 }
902902 } else if reflectV .Type ().AssignableTo (field .FieldType ) {
Original file line number Diff line number Diff line change 88 "testing"
99 "time"
1010
11+ "github.com/google/uuid"
1112 "gorm.io/gorm"
1213 . "gorm.io/gorm/utils/tests"
1314)
@@ -114,6 +115,7 @@ func TestEmbeddedPointerTypeStruct(t *testing.T) {
114115 ContentPtr * Content
115116 Birthday time.Time
116117 BirthdayPtr * time.Time
118+ AuthorUUID * uuid.UUID
117119 }
118120
119121 type HNPost struct {
You can’t perform that action at this time.
0 commit comments