Skip to content

Commit

Permalink
Fix for #39. No need to create keys with null values.
Browse files Browse the repository at this point in the history
  • Loading branch information
emacarron committed Dec 23, 2015
1 parent a289c57 commit 4dd3384
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ private CacheKey createRowKey(ResultMap resultMap, ResultSetWrapper rsw, String
createRowKeyForMappedProperties(resultMap, rsw, cacheKey, resultMappings, columnPrefix);
}
if (cacheKey.getUpdateCount() < 2) {
return CacheKey.NULL_CACHE_KEY; // fix for #39
return CacheKey.NULL_CACHE_KEY;
}
return cacheKey;
}
Expand Down Expand Up @@ -997,8 +997,10 @@ private void createRowKeyForMappedProperties(ResultMap resultMap, ResultSetWrapp
// Issue #114
if (column != null && mappedColumnNames.contains(column.toUpperCase(Locale.ENGLISH))) {
final Object value = th.getResult(rsw.getResultSet(), column);
cacheKey.update(column); // fix for #39 (removed if)
cacheKey.update(value);
if (value != null) {
cacheKey.update(column);
cacheKey.update(value);
}
}
}
}
Expand Down

0 comments on commit 4dd3384

Please sign in to comment.