1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 23:20:48 +00:00

Merge pull request #2997 from DennisMao/master

fix the model can not be registered correctly on Ubuntu 32bit
This commit is contained in:
astaxie 2018-07-20 23:14:41 +08:00 committed by GitHub
commit bc773039ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,8 @@ func addModelFields(mi *modelInfo, ind reflect.Value, mName string, index []int)
break
}
//record current field index
fi.fieldIndex = append(index, i)
fi.fieldIndex = append(fi.fieldIndex, index...)
fi.fieldIndex = append(fi.fieldIndex, i)
fi.mi = mi
fi.inModel = true
if !mi.fields.Add(fi) {