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
<p>Remember, these are preferences, not requirements, but others will thank you for using a common directory structure.</p>
74
+
<p>当然这是推荐的目录结构,并非强制要求,但是使用一个通用的目录结构将更利于大家沟通。</p>
75
75
<p>这部分内容剩余的示例将假设你使用了这种目录结构。</p>
76
76
</subsection>
77
77
@@ -85,7 +85,8 @@ SqlSessionFactoryBuilder 创建的,它可以从 XML 配置,注解或手动配置
85
85
SqlSessionFactory。
86
86
</p>
87
87
<p>
88
-
<spanclass="label important">NOTE</span> When using MyBatis with a dependency injection framework like Spring or Guice, SqlSessions are created and injected by the DI framework so you don't need to use the SqlSessionFactoryBuilder or SqlSessionFactory and can go directly to the SqlSession section. Please refer to the MyBatis-Spring or MyBatis-Guice manuals for further info.
@@ -363,8 +364,8 @@ public interface ResultHandler<T> {
363
364
尔返回值的 stop()方法来停止 MyBatis 加载更多的结果。
364
365
</p>
365
366
366
-
<h5>Batch update statement Flush Method</h5>
367
-
<p>There is method for flushing(executing) batch update statements that stored in a JDBC driver class at any timing. This method can be used when you use the <code>ExecutorType.BATCH</code> as <code>ExecutorType</code>.</p>
<p><spanclass="label important">NOTE</span> MyBatis-Spring and MyBatis-Guice provide declarative transaction handling. So if you are using MyBatis with Spring or Guice please refer to their specific manuals.</p>
<td>This annotation duplicates the <code><selectKey></code> functionality for methods annotated with
777
-
<code>@Insert</code>, <code>@InsertProvider</code>, <code>@Update</code> or <code>@UpdateProvider</code>. It is ignored for other methods. If you specify a
778
-
<code>@SelectKey</code> annotation, then MyBatis will ignore any generated key properties set via the
779
-
<code>@Options</code> annotation, or configuration properties.
780
-
Attributes: statement an array of strings which is the SQL statement to execute, <code>keyProperty</code> which
781
-
is the property of the parameter object that will be updated with the new value, before which must be either
782
-
<code>true</code> or <code>false</code> to denote if the SQL statement should be executed before or after the insert,
783
-
<code>resultType</code> which is the Java type of the <code>keyProperty</code>, and <code>statementType=PREPARED</code>.</td>
774
+
<td>
775
+
该注解复制了<code><selectKey></code>的功能,用在注解了<code>@Insert</code>, <code>@InsertProvider</code>, <code>@Update</code> or <code>@UpdateProvider</code>的方法上。在其他方法上将被忽略。如果你指定了一个<code>@SelectKey</code>注解,然后Mybatis将忽略任何生成的key属性通过设置<code>@Options</code>,或者配置属性。
<td>If this annotation is used, it can be called the <code>SqlSession#flushStatements()</code> via method defined at a Mapper interface.(MyBatis 3.3 or above)</td>
0 commit comments