orm fix syncdb

This commit is contained in:
slene
2013-08-25 11:31:07 +08:00
parent 4c061feddf
commit 7c72b2dca7
5 changed files with 42 additions and 30 deletions

View File

@@ -58,8 +58,8 @@ func (mc *_modelCache) all() map[string]*modelInfo {
func (mc *_modelCache) allOrdered() []*modelInfo {
m := make([]*modelInfo, 0, len(mc.orders))
for _, v := range mc.cache {
m = append(m, v)
for _, table := range mc.orders {
m = append(m, mc.cache[table])
}
return m
}