1
0
의 미러 https://github.com/astaxie/beego.git synced 2025-07-17 18:52:16 +00:00
This commit is contained in:
Artem Nistratov
2015-07-08 17:42:00 +03:00
부모 a89f14d80d
커밋 5612f61a93
2개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@@ -269,7 +269,10 @@ func bootStrap() {
if found == false {
mForC:
for _, ffi := range fi.relModelInfo.fields.fieldsByType[RelManyToMany] {
if ffi.relModelInfo == mi {
conditions := fi.relThrough != "" && fi.relThrough == ffi.relThrough ||
fi.relTable != "" && fi.relTable == ffi.relTable ||
fi.relThrough == "" && fi.relTable == ""
if ffi.relModelInfo == mi && conditions {
found = true
fi.reverseField = ffi.reverseFieldInfoTwo.name

파일 보기

@@ -223,6 +223,11 @@ checkType:
break checkType
case "many":
fieldType = RelReverseMany
if tv := tags["rel_table"]; tv != "" {
fi.relTable = tv
} else if tv := tags["rel_through"]; tv != "" {
fi.relThrough = tv
}
break checkType
default:
err = fmt.Errorf("error")