|
Did I say "use query.addSynchronizedQuerySpace("")"? No. You did.
This idea of a synchronized space is not hard to understand. Just stop and think about it. In your original test, the impact is limited to the "Account" table. So tell Hibernate that:
Session session2 = sessionFactory.openSession();
SQLQuery query2 = session2.createSQLQuery("create table if not exists Account (id int)");
query2.addSynchronizedQuerySpace( "Account" );
query2.executeUpdate();
session2.close();
|