1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-11 08:31:01 +00:00

orm support complete m2m operation api / auto load related api

This commit is contained in:
slene
2013-10-14 22:31:35 +08:00
parent e11c40eee4
commit d043ebcdd3
11 changed files with 850 additions and 234 deletions

View File

@ -16,6 +16,8 @@ type modelInfo struct {
fields *fields
manual bool
addrField reflect.Value
uniques []string
isThrough bool
}
func newModelInfo(val reflect.Value) (info *modelInfo) {
@ -118,5 +120,7 @@ func newM2MModelInfo(m1, m2 *modelInfo) (info *modelInfo) {
info.fields.Add(f1)
info.fields.Add(f2)
info.fields.pk = fa
info.uniques = []string{f1.column, f2.column}
return
}