resolved merge
This commit is contained in:
commit
9f288b6e27
|
@ -481,7 +481,9 @@ func (engine *Engine) mapType(v reflect.Value) *Table {
|
|||
table := engine.newTable()
|
||||
method := v.MethodByName("TableName")
|
||||
if !method.IsValid() {
|
||||
method = v.Addr().MethodByName("TableName")
|
||||
if v.CanAddr() {
|
||||
method = v.Addr().MethodByName("TableName")
|
||||
}
|
||||
}
|
||||
if method.IsValid() {
|
||||
params := []reflect.Value{}
|
||||
|
|
|
@ -2934,7 +2934,7 @@ func (session *Session) Update(bean interface{}, condiBean ...interface{}) (int6
|
|||
session.Engine.Quote(table.Version)+" = "+session.Engine.Quote(table.Version)+" + 1",
|
||||
condition)
|
||||
|
||||
verValue = table.VersionColumn().ValueOf(bean)
|
||||
verValue = table.VersionColumn().ValueOf(bean)
|
||||
//if err != nil {
|
||||
// return 0, err
|
||||
//}
|
||||
|
|
|
@ -523,6 +523,9 @@ func (statement *Statement) Cols(columns ...string) *Statement {
|
|||
statement.columnMap[strings.ToLower(nc)] = true
|
||||
}
|
||||
statement.ColumnStr = statement.Engine.Quote(strings.Join(newColumns, statement.Engine.Quote(", ")))
|
||||
if strings.Contains(statement.ColumnStr, ".") {
|
||||
statement.ColumnStr = strings.Replace(statement.ColumnStr, ".", statement.Engine.Quote("."), -1)
|
||||
}
|
||||
return statement
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue