From 1da71e850a838ab4b1320e7cde0dac6316cb3777 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 26 Oct 2015 16:06:38 +0800 Subject: [PATCH] resolved #309 --- session.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/session.go b/session.go index 1c67faca..e2b1d407 100644 --- a/session.go +++ b/session.go @@ -3332,10 +3332,14 @@ func (session *Session) innerInsert(bean interface{}) (int64, error) { var v interface{} = id switch aiValue.Type().Kind() { + case reflect.Int16: + v = int16(id) case reflect.Int32: v = int32(id) case reflect.Int: v = int(id) + case reflect.Uint16: + v = uint16(id) case reflect.Uint32: v = uint32(id) case reflect.Uint64: