I have a native query that does a batch insert into a MySQL database:
String sql = \"insert into t1 (a, b) select x, y from t2 where x = \'foo\'\"; E
You need to set it at the connection level, get the session from the entitymanager and do this:
org.hibernate.Session session = (Session)entityManager.getDelegate(); Connection connection = session.connection(); connection.setTransactionIsolation(Connection.READ_UNCOMMITTED);