[null] 自定义类型为nil时,没有忽略掉该字段 #1372
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
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1372
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?
背景
当类型中的某个字段实现了core.Conversion接口,但是值为nil时,还是调用了ToDB()
期望
为nil时,应该忽略掉该字段,使用数据库默认的值,例如NULL等
示例
Addr 为json 类型
源代码
这里没有判断nil的处理
@Tang-RoseChild could you send a PR to fix that?
i'm too busy now, maybe later?
@Tang-RoseChild That's OK.