Skip to content

Commit

Permalink
Merge pull request #1988 from querydsl/i1978
Browse files Browse the repository at this point in the history
Fix serialization
  • Loading branch information
timowest committed Aug 30, 2016
2 parents d0bae8a + 4e94a89 commit 63f25d6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Expand Up @@ -986,7 +986,9 @@ protected void visitOperation(Class<?> type, Operator operator, List<? extends E
} else {
result = ExpressionUtils.notInAny(path, partitioned);
}
append("(");
result.accept(this, null);
append(")");
}
}

Expand Down
Expand Up @@ -17,6 +17,9 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.util.ArrayList;
import java.util.List;

import org.junit.Test;

import com.querydsl.core.QueryFlag;
Expand Down Expand Up @@ -79,6 +82,17 @@ public void modifiers2() {
"where rn > 3 and rownum <= 5", query.toString());
}

@Test
public void in() {
List<Integer> ids = new ArrayList<Integer>();
for (int i = 0; i < 2000; i++) {
ids.add(i);
}
query.where(survey1.id.isNotNull());
query.where(survey1.id.in(ids));
assertTrue(query.toString().startsWith("from dual where survey1.ID is not null and (survey1.ID in "));
}

@Test
public void nextVal() {
Operation<String> nextval = ExpressionUtils.operation(String.class, SQLOps.NEXTVAL, ConstantImpl.create("myseq"));
Expand Down

0 comments on commit 63f25d6

Please sign in to comment.