HHH-4084 Corrected test for 4.1
This commit is contained in:
parent
97770fe6a9
commit
b7d545e778
|
@ -8,8 +8,8 @@ import javax.persistence.Table;
|
||||||
import javax.persistence.UniqueConstraint;
|
import javax.persistence.UniqueConstraint;
|
||||||
|
|
||||||
import org.hibernate.AnnotationException;
|
import org.hibernate.AnnotationException;
|
||||||
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
|
|
||||||
import org.hibernate.cfg.Configuration;
|
import org.hibernate.cfg.Configuration;
|
||||||
|
import org.hibernate.service.ServiceRegistryBuilder;
|
||||||
import org.hibernate.service.spi.ServiceRegistryImplementor;
|
import org.hibernate.service.spi.ServiceRegistryImplementor;
|
||||||
import org.hibernate.testing.TestForIssue;
|
import org.hibernate.testing.TestForIssue;
|
||||||
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
||||||
|
@ -41,8 +41,8 @@ public class UniqueConstraintValidationTest extends BaseUnitTestCase {
|
||||||
Configuration cfg = new Configuration();
|
Configuration cfg = new Configuration();
|
||||||
cfg.addAnnotatedClass(entity);
|
cfg.addAnnotatedClass(entity);
|
||||||
cfg.buildMappings();
|
cfg.buildMappings();
|
||||||
ServiceRegistryImplementor serviceRegistry = (ServiceRegistryImplementor) new StandardServiceRegistryBuilder()
|
ServiceRegistryImplementor serviceRegistry = (ServiceRegistryImplementor) new ServiceRegistryBuilder()
|
||||||
.applySettings(cfg.getProperties()).build();
|
.applySettings(cfg.getProperties()).buildServiceRegistry();
|
||||||
cfg.buildSessionFactory(serviceRegistry);
|
cfg.buildSessionFactory(serviceRegistry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue