自定义字符型time类型空值问题,ToDB 返回(nil,nil)类型不能转换(mysql) #1940
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1940
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
在我的项目中,由于第三方库不支持基类型为time.Time的自定义类型,所以改为基类型为string的类型。
类型定义如下:
当调用db.insert(&tableStruct)时候,报错:"Error 1292: Incorrect date value: '' for column
test
.inp_reg
.admiss_date
at row 1"跟踪xorm源码 go\pkg\mod\xorm.io\xorm@v1.0.5\internal\statements\values.go
开始部分缺失nil判断
添加nil判断后错误得到解决。
Could you confirm that #1935 resolve you problem?
是的,谢谢。
oh my god!
#1935 不应该只在IsBlob()内部判断nil,才能解决我的诉求。