HHH-11133 : Fix test case to work pre-5.2

This commit is contained in:
Gail Badner 2017-06-09 15:19:53 -07:00
parent 0510ea8954
commit 65df88dfb8
1 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,8 @@
package org.hibernate.test.discriminator.joined;
import org.hibernate.Session;
import org.hibernate.resource.transaction.spi.TransactionStatus;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.Test;
@ -34,11 +36,11 @@ public class JoinedSubclassInheritanceTest extends BaseCoreFunctionalTestCase {
session.getTransaction().commit();
session.clear();
ce = (ChildEntity) session.find( ChildEntity.class, 1 );
ce = (ChildEntity) session.get( ChildEntity.class, 1 );
assertEquals( "ce", ce.getType() );
}
catch ( Exception e ) {
if ( session.getTransaction().isActive() ) {
if ( session.getTransaction().getStatus() == TransactionStatus.ACTIVE ) {
session.getTransaction().rollback();
}
}