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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user