d7fe5ef4 by astaxie

Merge pull request #1004 from fugr/patch-2

Transaction
2 parents 07c628c7 8bd90281
......@@ -117,7 +117,7 @@ o.Begin()
...
user := User{Name: "slene"}
id, err := o.Insert(&user)
if err != nil {
if err == nil {
o.Commit()
} else {
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!