Skip to content

Commit 9aea401

Browse files
committed
Change Default Behavior - empty list conditions render by default
This will force an empty list condition to render by default - which will cause an SQLException. After much discussion and many issues, we decided this was the safest approach.
1 parent 2ec09c4 commit 9aea401

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/mybatis/dynamic/sql/configuration/GlobalConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class GlobalConfiguration {
2626
public static final String CONFIGURATION_FILE_PROPERTY = "mybatis-dynamic-sql.configurationFile"; //$NON-NLS-1$
2727
private static final String DEFAULT_PROPERTY_FILE = "mybatis-dynamic-sql.properties"; //$NON-NLS-1$
2828
private boolean isNonRenderingWhereClauseAllowed = false;
29-
private boolean isEmptyListConditionRenderingAllowed = false;
29+
private boolean isEmptyListConditionRenderingAllowed = true;
3030
private final Properties properties = new Properties();
3131

3232
public GlobalConfiguration() {
@@ -67,7 +67,7 @@ private void initializeKnownProperties() {
6767
String value = properties.getProperty("nonRenderingWhereClauseAllowed", "false"); //$NON-NLS-1$ //$NON-NLS-2$
6868
isNonRenderingWhereClauseAllowed = Boolean.parseBoolean(value);
6969

70-
value = properties.getProperty("emptyListConditionRenderingAllowed", "false"); //$NON-NLS-1$ //$NON-NLS-2$
70+
value = properties.getProperty("emptyListConditionRenderingAllowed", "true"); //$NON-NLS-1$ //$NON-NLS-2$
7171
isEmptyListConditionRenderingAllowed = Boolean.parseBoolean(value);
7272
}
7373

0 commit comments

Comments
 (0)