fixed
h2 insert
This commit is contained in:
parent
896e8e9850
commit
e763dee703
|
@ -119,7 +119,7 @@ func createCallback(scope *Scope) {
|
|||
} else {
|
||||
|
||||
if scope.Dialect().GetName() == "h2" {
|
||||
_, err := scope.SQLDB().Query(scope.SQL, scope.SQLVars...)
|
||||
_, err := scope.SQLDB().Exec(scope.SQL, scope.SQLVars...)
|
||||
if scope.Err(err) == nil {
|
||||
primaryField.IsBlank = false
|
||||
scope.db.RowsAffected = 1
|
||||
|
|
|
@ -114,7 +114,7 @@ func (s h2) CurrentDatabase() (name string) {
|
|||
|
||||
func (s h2) LastInsertIDReturningSuffix(tableName, key string) string {
|
||||
//return fmt.Sprintf("RETURNING %v.%v", tableName, key)
|
||||
return fmt.Sprintf(" ; CALL IDENTITY(); ")
|
||||
return fmt.Sprintf(" ; ")
|
||||
}
|
||||
|
||||
func (h2) SupportLastInsertID() bool {
|
||||
|
|
Loading…
Reference in New Issue
Block a user