orm full remove orm.Manager for simple use, add struct tag - for skip struct field

This commit is contained in:
slene
2013-08-09 20:14:18 +08:00
parent 402932aa6e
commit f2b359d8e8
16 changed files with 161 additions and 301 deletions

View File

@@ -33,7 +33,6 @@ import (
type User struct {
Id int `orm:"auto"`
Name string `orm:"size(100)"`
orm.Manager
}
func init() {
@@ -72,7 +71,6 @@ type Post struct {
Id int `orm:"auto"`
Title string `orm:"size(100)"`
User *User `orm:"rel(fk)"`
orm.Manager
}
var posts []*Post