mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-24 03:57:45 +00:00
#1584 - Fix for - Query cache bug, which produces wrong results
This commit is contained in:
@@ -56,11 +56,10 @@ public final class BeanFkeyProperty implements ElPropertyValue {
|
||||
}
|
||||
}
|
||||
|
||||
public BeanFkeyProperty create(String expression, boolean containsMany) {
|
||||
public BeanFkeyProperty create(String expression, boolean pathContainsMany) {
|
||||
int len = expression.length() - name.length() - 1;
|
||||
String prefix = expression.substring(0, len);
|
||||
|
||||
return new BeanFkeyProperty(prefix, name, dbColumn, deployOrder, containsMany);
|
||||
return new BeanFkeyProperty(prefix, name, dbColumn, deployOrder, containsMany || pathContainsMany);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+7
-7
@@ -1,14 +1,14 @@
|
||||
package org.tests.query.cache;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import io.ebean.BaseTestCase;
|
||||
import io.ebean.Ebean;
|
||||
import io.ebean.ExpressionList;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class TestDistinct extends BaseTestCase {
|
||||
/**
|
||||
@@ -56,4 +56,4 @@ public class TestDistinct extends BaseTestCase {
|
||||
public ExpressionList<ContractCosts> costsQuery(final Long... aclId) {
|
||||
return Ebean.find(ContractCosts.class).where().in("position.contract.aclEntries.aclEntry.id", aclId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user