From 4f3f7a6fa9ad81d308011ba52de7dfa44934b5e7 Mon Sep 17 00:00:00 2001 From: DrWrong Date: Tue, 19 Jun 2018 19:14:35 +0800 Subject: [PATCH] Fix BUG: Update statement build function should ingore ONLYFROMDB fields --- statement.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/statement.go b/statement.go index c67d8c01..54c6006b 100644 --- a/statement.go +++ b/statement.go @@ -261,6 +261,10 @@ func (statement *Statement) buildUpdates(bean interface{}, continue } + if col.MapType == core.ONLYFROMDB { + continue + } + fieldValuePtr, err := col.ValueOf(bean) if err != nil { engine.logger.Error(err)