mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
更新sqlchemy
This commit is contained in:
+8
-6
@@ -85,12 +85,14 @@ func (us *SUpdateSession) saveUpdate(dt interface{}) (map[string]SUpdateDiff, er
|
||||
k := c.Name()
|
||||
of := ofields[k]
|
||||
nf := fields[k]
|
||||
if c.IsPrimary() && !c.IsZero(of) { // skip update primary key
|
||||
primaries[k] = of
|
||||
continue
|
||||
} else if c.IsKeyIndex() && !c.IsZero(of) {
|
||||
keyIndexes[k] = of
|
||||
continue
|
||||
if !gotypes.IsNil(of) {
|
||||
if c.IsPrimary() && !c.IsZero(of) { // skip update primary key
|
||||
primaries[k] = of
|
||||
continue
|
||||
} else if c.IsKeyIndex() && !c.IsZero(of) {
|
||||
keyIndexes[k] = of
|
||||
continue
|
||||
}
|
||||
}
|
||||
nc, ok := c.(*SIntegerColumn)
|
||||
if ok && nc.IsAutoVersion {
|
||||
|
||||
Reference in New Issue
Block a user