From 9bf34c31890cb518c714bedfec324cdfaacc4cf7 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 7 Jul 2016 09:01:13 +0800 Subject: [PATCH] small optimization --- README.md | 4 ++-- session.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dfaf1c03..6a224f33 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Xorm is a simple and powerful ORM for Go. [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-xorm/xorm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Build Status](https://drone.io/github.com/go-xorm/tests/status.png)](https://drone.io/github.com/go-xorm/tests/latest) [![Go Walker](http://gowalker.org/api/v1/badge)](http://gowalker.org/github.com/go-xorm/xorm) [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lunny/xorm/trend.png)](https://bitdeli.com/free "Bitdeli Badge") +[![Build Status](https://drone.io/github.com/go-xorm/tests/status.png)](https://drone.io/github.com/go-xorm/tests/latest) # Notice @@ -61,7 +61,7 @@ Drivers for Go's sql package which currently support database/sql includes: * **v0.4.5** * many bugs fixed - * extends support unlimited deep + * extends support unlimited deepth * Delete Limit support * **v0.4.4** diff --git a/session.go b/session.go index f6b96192..77fcce82 100644 --- a/session.go +++ b/session.go @@ -1840,8 +1840,9 @@ func (session *Session) _row2Bean(rows *core.Rows, fields []string, fieldsCount return err } if has { - v := structInter.Elem().Interface() - fieldValue.Set(reflect.ValueOf(v)) + //v := structInter.Elem().Interface() + //fieldValue.Set(reflect.ValueOf(v)) + fieldValue.Set(structInter.Elem()) } else { return errors.New("cascade obj is not exist!") }