You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the MyBatis 3.4.2, your can specify a default value into placeholder as follow:
94
+
从MyBatis 3.4.2开始,你可以为占位符指定一个默认值。例如:
95
95
</p>
96
96
<source><![CDATA[
97
97
<dataSource type="POOLED">
@@ -100,8 +100,8 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
100
100
</dataSource>]]></source>
101
101
102
102
<p>
103
-
This feature is disabled by default. If you specify a default value into placeholder,
104
-
you should be enable this feature by adding a special property as follow:
103
+
这个特性默认是关闭的。如果你想为占位符指定一个默认值,
104
+
你应该添加一个指定的属性来开启这个特性。例如:
105
105
</p>
106
106
107
107
<source><![CDATA[
@@ -111,9 +111,9 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
111
111
</properties>]]></source>
112
112
113
113
<p>
114
-
<spanclass="label important">NOTE</span> Also If you are used already the <code>":"</code> as property key(e.g. <code>db:username</code>)
115
-
or you are used already the ternary operator of OGNL expression(e.g. <code>${tableName != null ? tableName : 'global_constants'}</code>) on your sql definition,
116
-
you should be change the character that separate key and default value by adding a special property as follow:
@@ -175,7 +175,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
175
175
aggressiveLazyLoading
176
176
</td>
177
177
<td>
178
-
When enabled, any method call will load all the lazy properties of the object. Otherwise, each property is loaded on demand (see also <code>lazyLoadTriggerMethods</code>).
@@ -249,11 +249,11 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
249
249
autoMappingUnknownColumnBehavior
250
250
</td>
251
251
<td>
252
-
Specify the behavior when detects an unknown column (or unknown property type) of automatic mapping target.
252
+
指定发现自动映射目标未知列(或者未知属性类型)的行为。
253
253
<ul>
254
-
<li><code>NONE</code>: Do nothing</li>
255
-
<li><code>WARNING</code>: Output warning log (The log level of <code>'org.apache.ibatis.session.AutoMappingUnknownColumnBehavior'</code> must be set to <code>WARN</code>)</li>
0 commit comments