persistence work

This commit is contained in:
eugenp
2013-08-13 01:11:55 +03:00
parent 380e14bff0
commit f9712c2db4
4 changed files with 8 additions and 6 deletions
@@ -2,7 +2,6 @@ package org.baeldung.ex.mappingexception;
import org.baeldung.ex.mappingexception.cause2.persistence.model.Foo;
import org.baeldung.ex.mappingexception.spring.Cause2PersistenceConfig;
import org.hibernate.MappingException;
import org.hibernate.SessionFactory;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -21,7 +20,8 @@ public class Cause2MappingExceptionIntegrationTest {
// tests
@Test(expected = MappingException.class)
// @Test(expected = MappingException.class)
@Test
@Transactional
public final void givenEntityIsPersisted_thenException() {
sessionFactory.getCurrentSession().saveOrUpdate(new Foo());