Permalink
Browse files

Merge pull request #1988 from querydsl/i1978

Fix serialization
  • Loading branch information...
2 parents d0bae8a + 4e94a89 commit 63f25d60b1c209ddc4298fc3f8eb7bbb2cd32372 @timowest timowest committed on GitHub Aug 30, 2016
@@ -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(")");
}
}
@@ -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;
@@ -80,6 +83,17 @@ public void modifiers2() {
}
@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"));
assertEquals("myseq.nextval", new SQLSerializer(new Configuration(new OracleTemplates())).handle(nextval).toString());

0 comments on commit 63f25d6

Please sign in to comment.