From 39ac07be550c5f5b6fd265c8870f58015c95e908 Mon Sep 17 00:00:00 2001 From: Joel Pettersson Date: Tue, 1 Mar 2016 18:50:21 +0900 Subject: [PATCH] Compare resolved key string using `equals()` --- DaoGenerator/src-template/entity.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DaoGenerator/src-template/entity.ftl b/DaoGenerator/src-template/entity.ftl index 0e383d847..1b8587ef4 100644 --- a/DaoGenerator/src-template/entity.ftl +++ b/DaoGenerator/src-template/entity.ftl @@ -168,7 +168,7 @@ ${property.javaDocSetter} ${toOne.fkProperties[0].javaType} __key = this.${toOne.fkProperties[0].propertyName}; if (${toOne.name}__resolvedKey == null || <#-- --><#if toOne.resolvedKeyUseEquals[0]>!${toOne.name}__resolvedKey.equals(__key)<#-- - --><#else>${toOne.name}__resolvedKey != __key) { + --><#else>!${toOne.name}__resolvedKey.equals(__key)) { if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); }