Skip to content

Commit a4b0f84

Browse files
committed
Docs
1 parent acce778 commit a4b0f84

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

core/mybatis-generator-core/src/main/java/org/mybatis/generator/plugins/IgnoreViewsPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ public boolean validate(List<String> warnings) {
3131

3232
@Override
3333
public boolean shouldGenerate(IntrospectedTable introspectedTable) {
34-
return !"VIEW".equals(introspectedTable.getTableType()); //$NON-NLS-1$
34+
return !"VIEW".equalsIgnoreCase(introspectedTable.getTableType()); //$NON-NLS-1$
3535
}
3636
}

core/mybatis-generator-core/src/site/xhtml/reference/plugins.xhtml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2006-2022 the original author or authors.
4+
Copyright 2006-2023 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -119,6 +119,11 @@ The plugin will create the additional Methods:
119119
<p>Using this plugin, you can configure the property values fluently with chained method calls. Example: <code>new MyDomain().withFoo("Test").withBar(4711);</code></p>
120120

121121

122+
<h2>org.mybatis.generator.plugins.IgnoreViewsPlugin</h2>
123+
<p>This plugin will filter out any table of type "VIEW" from a code generation run. This can be useful if you use
124+
a wildcard to select many tables and views, but don't want to generate code for the views.
125+
</p>
126+
122127
<h2>org.mybatis.generator.plugins.MapperAnnotationPlugin</h2>
123128
<p>This plugin has no impact and is not needed when the target runtime in use is based on MyBatis Dynamic SQL.</p>
124129
<p>This plugin adds the <code>@Mapper</code> annotation to generated mapper interfaces. This

core/mybatis-generator-core/src/site/xhtml/whatsNew.xhtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
Logging should now work as expected in Maven - Maven ships with the SLF4J simple logger in the classpath, so
4141
configuring logging in Maven will always use the SLF simple logger.
4242
</li>
43+
<li>Added a new plugin method "shouldGenerate" that can be used to provide fine-grained filtering of tables in a
44+
context. Also added a new "IgnoreViewsPlugin" that filters out table type VIEW
45+
</li>
4346
</ul>
4447

4548

0 commit comments

Comments
 (0)