bug fixed #195
This commit is contained in:
parent
8402302cc7
commit
2a5d411c8c
16
session.go
16
session.go
|
@ -2058,11 +2058,19 @@ func (session *Session) innerInsertMulti(rowsSlicePtr interface{}) (int64, error
|
||||||
if col.MapType == core.ONLYFROMDB {
|
if col.MapType == core.ONLYFROMDB {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if col.IsDeleted {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if session.Statement.ColumnStr != "" {
|
if session.Statement.ColumnStr != "" {
|
||||||
if _, ok := session.Statement.columnMap[col.Name]; !ok {
|
if _, ok := session.Statement.columnMap[col.Name]; !ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if session.Statement.OmitStr != "" {
|
||||||
|
if _, ok := session.Statement.columnMap[col.Name]; ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
if (col.IsCreated || col.IsUpdated) && session.Statement.UseAutoTime {
|
if (col.IsCreated || col.IsUpdated) && session.Statement.UseAutoTime {
|
||||||
args = append(args, session.Engine.NowTime(col.SQLType.Name))
|
args = append(args, session.Engine.NowTime(col.SQLType.Name))
|
||||||
} else {
|
} else {
|
||||||
|
@ -2086,11 +2094,19 @@ func (session *Session) innerInsertMulti(rowsSlicePtr interface{}) (int64, error
|
||||||
if col.MapType == core.ONLYFROMDB {
|
if col.MapType == core.ONLYFROMDB {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if col.IsDeleted {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if session.Statement.ColumnStr != "" {
|
if session.Statement.ColumnStr != "" {
|
||||||
if _, ok := session.Statement.columnMap[col.Name]; !ok {
|
if _, ok := session.Statement.columnMap[col.Name]; !ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if session.Statement.OmitStr != "" {
|
||||||
|
if _, ok := session.Statement.columnMap[col.Name]; ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
if (col.IsCreated || col.IsUpdated) && session.Statement.UseAutoTime {
|
if (col.IsCreated || col.IsUpdated) && session.Statement.UseAutoTime {
|
||||||
args = append(args, session.Engine.NowTime(col.SQLType.Name))
|
args = append(args, session.Engine.NowTime(col.SQLType.Name))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue