orm: fix panic multi insert when slice lenght is 1 & the value is pointer

This commit is contained in:
miraclesu 2016-04-13 20:14:02 +08:00
parent 002dcaab23
commit 3a3f70027c
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ func (o *orm) InsertMulti(bulk int, mds interface{}) (int64, error) {
if bulk <= 1 {
for i := 0; i < sind.Len(); i++ {
ind := sind.Index(i)
ind := reflect.Indirect(sind.Index(i))
mi, _ := o.getMiInd(ind.Interface(), false)
id, err := o.alias.DbBaser.Insert(o.db, mi, ind, o.alias.TZ)
if err != nil {