mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 22:11:29 +00:00
add more comments
This commit is contained in:
parent
083f697c59
commit
e0c59fcf0b
@ -103,6 +103,8 @@ func bootStrap() {
|
|||||||
goto end
|
goto end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set rel and reverse model
|
||||||
|
// RelManyToMany set the relTable
|
||||||
models = modelCache.all()
|
models = modelCache.all()
|
||||||
for _, mi := range models {
|
for _, mi := range models {
|
||||||
for _, fi := range mi.fields.columns {
|
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()
|
models = modelCache.all()
|
||||||
for _, mi := range models {
|
for _, mi := range models {
|
||||||
for _, fi := range mi.fields.fieldsRel {
|
for _, fi := range mi.fields.fieldsRel {
|
||||||
@ -167,7 +171,6 @@ func bootStrap() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if inModel == false {
|
if inModel == false {
|
||||||
rmi := fi.relModelInfo
|
rmi := fi.relModelInfo
|
||||||
ffi := new(fieldInfo)
|
ffi := new(fieldInfo)
|
||||||
|
Loading…
Reference in New Issue
Block a user