Methods Summary |
---|
public void | configure(org.hibernate.cfg.Configuration cfg)
cfg.setProperty( Environment.USE_IDENTIFIER_ROLLBACK, "true");
super.configure( cfg );
|
public java.lang.String[] | getMappings()
return new String[] { "id/Product.hbm.xml" };
|
public static junit.framework.Test | suite()
return new FunctionalTestClassTestSuite( UseIdentifierRollbackTest.class );
|
public void | testSimpleRollback()
Session session = openSession();
Transaction t = session.beginTransaction();
Product prod = new Product();
assertNull( prod.getName() );
session.persist(prod);
session.flush();
assertNotNull( prod.getName() );
t.rollback();
session.close();
|