d7fe5ef4 by astaxie

Merge pull request #1004 from fugr/patch-2

Transaction
2 parents 07c628c7 8bd90281
...@@ -117,7 +117,7 @@ o.Begin() ...@@ -117,7 +117,7 @@ o.Begin()
117 ... 117 ...
118 user := User{Name: "slene"} 118 user := User{Name: "slene"}
119 id, err := o.Insert(&user) 119 id, err := o.Insert(&user)
120 if err != nil { 120 if err == nil {
121 o.Commit() 121 o.Commit()
122 } else { 122 } else {
123 o.Rollback() 123 o.Rollback()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!