mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1926 - Postgres (Multi value bind) fix related to empty idIn() expression
This commit is contained in:
@@ -123,7 +123,7 @@ public class IdInExpression extends NonPrepareExpression {
|
||||
@Override
|
||||
public void queryPlanHash(StringBuilder builder) {
|
||||
builder.append("IdIn[?");
|
||||
if (!multiValueIdSupported) {
|
||||
if (!multiValueIdSupported || idCollection.isEmpty()) {
|
||||
// query plan specific to the number of parameters in the IN clause
|
||||
builder.append(idCollection.size());
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@ import java.util.List;
|
||||
|
||||
class InExpression extends AbstractExpression {
|
||||
|
||||
|
||||
|
||||
private final boolean not;
|
||||
|
||||
/**
|
||||
@@ -169,7 +167,7 @@ class InExpression extends AbstractExpression {
|
||||
builder.append("empty");
|
||||
} else {
|
||||
builder.append(" ?");
|
||||
if (!multiValueSupported) {
|
||||
if (!multiValueSupported || bindValues.isEmpty()) {
|
||||
// query plan specific to the number of parameters in the IN clause
|
||||
builder.append(bindValues.size());
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ class InPairsExpression extends AbstractExpression {
|
||||
builder.append(property1).append("-");
|
||||
builder.append(separator).append("-");
|
||||
builder.append(suffix).append(" ?");
|
||||
if (!multiValueSupported) {
|
||||
if (!multiValueSupported || entries.isEmpty()) {
|
||||
// query plan specific to the number of parameters in the IN clause
|
||||
builder.append(entries.size());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user