When I Use Insert Fuction , aff=0 && err=0 Under what circumstances will this happen? #1089
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#1089
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?
example code
什么情况下会出现,aff 等于0 且 err 不等于 nil 的情况呢,看文档上并没有说明此种情况。
I'm confusing this issue. Could you post more detail here?
比如有 唯一性索引的情况下,会出现 err !=nil 但 aff =0, 正常情况下插入一条数据,aff = 1, err = nil。
什么情况下插入一条数据,会出现 aff =0 ,err =nil 情况呢,或者说,只插入一条数据,不进行批量插入的情况下,可以 _, err := session.Insert() 忽略掉 aff 字段么?
For example, if there is a unique index, err !=nil but aff =0 will appear. Normally insert a piece of data, aff = 1, err = nil.
I don't know when to insert a piece of data, there will be aff =0, err =nil.