Open
Description
Go version
go version go1.22.3 darwin/amd64
GoFrame version
v2.7.1
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
pbentity.Blog
message Blog {
uint32 Id = 1 ; // Blog ID
string Title = 2 ; // Title
string Content = 3 ; // Content
string Nickname = 4 ; // Nickname
google.protobuf.Timestamp CreateAt = 5 ; // Created Time
google.protobuf.Timestamp UpdateAt = 6 ; // Updated Time
google.protobuf.Timestamp DeleteAt = 7 ; // Deleted Time
}
program:
var blog *pbentity.Blog
err := dao.Blog.Ctx(ctx).Cache(gdb.CacheOption{
Duration: time.Hour,
Name: "GetById",
Force: false,
}).Where(do.Blog{
Id: id,
}).Scan(&blog)
return blog, err
What did you see happen?
It is ok when not using cache, but an error will be reported when using cache:
reflect.Value.Convert: value of type *gvar.Var cannot be converted to type timestamppb.Timestamp
What did you expect to see?
The result of using cache should be the same as the result of not using cache.