Fix bug of ToDB when update on a nil pointer #1786

Merged
lunny merged 6 commits from lunny/fix_todb_upate into master 1 year ago
lunny commented 1 year ago
Owner

Fix #1785

Fix #1785
lunny added this to the 1.0.5 milestone 1 year ago
lunny added the
kind/bug
label 1 year ago
lunny force-pushed lunny/fix_todb_upate from 1915dcc94b to 4b9d2d6974 1 year ago
lunny added 1 commit 1 year ago
981b83bb67
Fix test
lunny added 1 commit 1 year ago
c2e9d7a21f
Add test for insert nil struct field
lunny added 1 commit 1 year ago
5434d62aa2
Fix bug
// /go/sdk_gopath/pkg/mod/xorm.io/xorm@v1.0.5-0.20200908093021-5434d62aa2d4/internal/statements/values.go:39 
// git 5434d62aa2d4b5076dc3d22399aae7fdd4dc27c3

if !fieldValue.IsNil() { // # call of reflect.Value.IsNil on int64 Value 
		if fieldConvert, ok := fieldValue.Interface().(convert.Conversion); ok {


```go // /go/sdk_gopath/pkg/mod/xorm.io/xorm@v1.0.5-0.20200908093021-5434d62aa2d4/internal/statements/values.go:39 // git 5434d62aa2d4b5076dc3d22399aae7fdd4dc27c3 if !fieldValue.IsNil() { // # call of reflect.Value.IsNil on int64 Value if fieldConvert, ok := fieldValue.Interface().(convert.Conversion); ok { ```
lunny added 1 commit 1 year ago
f761d3eefe
Fix bug
lunny added 1 commit 1 year ago
96e5302ceb
Fix test
lunny merged commit 1b200bdcba into master 1 year ago
lunny deleted branch lunny/fix_todb_upate 1 year ago
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
The pull request has been merged as 1b200bdcba.
Sign in to join this conversation.
Loading…
There is no content yet.