File tree 2 files changed +8
-1
lines changed
main/java/org/mybatis/dynamic/sql
test/java/examples/animal/data
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,13 @@ public boolean skipRenderingWhenEmpty() {
44
44
return skipRenderingWhenEmpty ;
45
45
}
46
46
47
+ /**
48
+ * Use with caution - this could cause the library to render invalid SQL like "where column in ()".
49
+ */
50
+ protected void forceRenderingWhenEmpty () {
51
+ skipRenderingWhenEmpty = false ;
52
+ }
53
+
47
54
@ Override
48
55
public <R > R accept (ConditionVisitor <T , R > visitor ) {
49
56
return visitor .visit (this );
Original file line number Diff line number Diff line change @@ -589,7 +589,7 @@ void testInConditionWithEmptyList() {
589
589
public static class IsInRequired <T > extends IsIn <T > {
590
590
protected IsInRequired (Collection <T > values ) {
591
591
super (values );
592
- skipRenderingWhenEmpty = false ;
592
+ forceRenderingWhenEmpty () ;
593
593
}
594
594
595
595
public static <T > IsInRequired <T > isIn (Collection <T > values ) {
You can’t perform that action at this time.
0 commit comments