From 0b1facc51311e058ce2a96da71c79368cd6b5ed8 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Sat, 26 Oct 2013 10:15:09 +0800 Subject: [PATCH] Yay, users inserted --- orm.go | 2 +- orm_test.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/orm.go b/orm.go index 43a609c1..9ef9b9d6 100644 --- a/orm.go +++ b/orm.go @@ -26,7 +26,7 @@ type Orm struct { } func (s *Orm) setModel(model interface{}) (err error) { - s.TableName = "user" + s.TableName = "users" s.PrimaryKey = "id" return } diff --git a/orm_test.go b/orm_test.go index b2311c41..668e0148 100644 --- a/orm_test.go +++ b/orm_test.go @@ -2,7 +2,6 @@ package gorm import ( "fmt" - "time" "testing" ) @@ -19,10 +18,7 @@ func getDB() DB { func TestSaveAndFirst(t *testing.T) { db := getDB() u := &User{Name: "jinzhu"} - fmt.Println("*******") - fmt.Println(db.Save(u).Sql) - fmt.Println(db.Save(u).Error) - fmt.Println(time.Now().String()) + db.Save(u) user := &User{} db.First(&user)