Fix for #227 - Many2Many cache bug, incorrect query plan hash calculation

This commit is contained in:
rbygrave committed 2015-01-11 20:45:07 +13:00
1 parent a998c0be55
commit 961b219e3e
3 files changed
+44 -4

No files matched your search

@@ -666,8 +666,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
*/
private HashQueryPlan calculateHash(BeanQueryRequest<?> request, HashQueryPlanBuilder builder) {
// exclude bind values and things unrelated to
// the sql being generated
// exclude bind values and things unrelated to the sql being generated
if (builder == null) {
builder = new HashQueryPlanBuilder();
@@ -680,6 +679,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
builder.add(mapKey);
builder.add(id != null);
builder.add(rawSql == null ? 0 : rawSql.queryHash());
builder.add(includeTableJoin != null ? includeTableJoin.queryHash() : 0);
if (detail != null) {
detail.queryPlanHash(request, builder);