1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 14:40:57 +00:00

add more comments

This commit is contained in:
astaxie 2016-09-22 23:14:49 +08:00
parent 083f697c59
commit e0c59fcf0b

View File

@ -103,6 +103,8 @@ func bootStrap() {
goto end
}
// set rel and reverse model
// RelManyToMany set the relTable
models = modelCache.all()
for _, mi := range models {
for _, fi := range mi.fields.columns {
@ -155,6 +157,8 @@ func bootStrap() {
}
}
// check the rel filed while the relModelInfo also has filed point to current model
// if not exist, add a new field to the relModelInfo
models = modelCache.all()
for _, mi := range models {
for _, fi := range mi.fields.fieldsRel {
@ -167,7 +171,6 @@ func bootStrap() {
break
}
}
if inModel == false {
rmi := fi.relModelInfo
ffi := new(fieldInfo)