Skip to content

Commit

Permalink
fix db 2022-08-18
Browse files Browse the repository at this point in the history
  • Loading branch information
hktalent committed Aug 18, 2022
1 parent bbab709 commit 5e9d93c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func GetOne[T any](rst *T, args ...interface{}) *T {
if nil == rst {
rst = new(T)
}
xxxD := dbCC.Table(GetTableName(*rst)).Model(rst)
xxxD := dbCC.Table(GetTableName(rst)).Model(rst)
xxxD.AutoMigrate(rst)
rst1 := xxxD.First(rst, args...)
if 0 == rst1.RowsAffected && nil != rst1.Error {
Expand Down

0 comments on commit 5e9d93c

Please sign in to comment.