1
This commit is contained in:
parent
64a68af3af
commit
2674163215
28
metamgr.go
28
metamgr.go
@ -63,6 +63,8 @@ func (this *MetaMgr) Load() {
|
|||||||
this.wrapNameHash = make([]map[string]interface{}, len(*this.metaClasses))
|
this.wrapNameHash = make([]map[string]interface{}, len(*this.metaClasses))
|
||||||
this.loadRawMetaTable()
|
this.loadRawMetaTable()
|
||||||
this.bindPrimKey()
|
this.bindPrimKey()
|
||||||
|
this.firstInitMetaList()
|
||||||
|
this.secondInitMetaList()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *MetaMgr) loadRawMetaTable() {
|
func (this *MetaMgr) loadRawMetaTable() {
|
||||||
@ -286,3 +288,29 @@ func (this *MetaMgr) adjustJsonForamt(metaClass *MetaClass, rawData string) stri
|
|||||||
}
|
}
|
||||||
return string(newData)
|
return string(newData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *MetaMgr) firstInitMetaList() {
|
||||||
|
for i := 0; i < len(this.wrapList); i++ {
|
||||||
|
metaList := reflect.ValueOf(this.wrapList[i])
|
||||||
|
for ii := 0; ii < metaList.Len(); ii++ {
|
||||||
|
meta := metaList.Index(ii)
|
||||||
|
initFunc := meta.MethodByName("Init")
|
||||||
|
if initFunc.IsValid() {
|
||||||
|
initFunc.Call(nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MetaMgr) secondInitMetaList() {
|
||||||
|
for i := 0; i < len(this.wrapList); i++ {
|
||||||
|
metaList := reflect.ValueOf(this.wrapList[i])
|
||||||
|
for i := 0; i < metaList.Len(); i++ {
|
||||||
|
meta := metaList.Index(i)
|
||||||
|
init2Func := meta.MethodByName("Init2")
|
||||||
|
if init2Func.IsValid() {
|
||||||
|
init2Func.Call(nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user