When is STATEMENT in Hibernate?

zhaozj2021-02-12  194

I checked it, I don't know if it's right.

First, in SessionImpl, there is an ExecuteAll method to perform the operation, executing Execute Batch () inside EXECUTEALL (), this method is as follows:

public void executeBatch () throws HibernateException {if (! batchUpdate = null) {final PreparedStatement ps = batchUpdate; batchUpdate = null; batchUpdateSQL = null; try {try {doExecuteBatch (ps);} finally {closeStatement (ps);}} catch (SQLEXCEPTION SQLE) {Throw new JDBCEXCEPTION ("Could Not Execute JDBC Batch Update", SQLE);}}}

So should be an operation such as insert, hibernate will turn off Statement yourself.

转载请注明原文地址:https://www.9cbs.com/read-6661.html

New Post(0)