Package org.hibernate.search.test.embedded.depth

Examples of org.hibernate.search.test.embedded.depth.PersonWithBrokenSocialSecurityNumber


    SearchFactoryImplementor searchFactoryImpl = getSearchFactoryImpl();
    MockErrorHandler errorHandler = (MockErrorHandler) searchFactoryImpl.getErrorHandler();

    Session s = getSessionFactory().openSession();
    s.getTransaction().begin();
    s.persist( new PersonWithBrokenSocialSecurityNumber( Long.valueOf( 2 ), "This guy is unaffected by identifier rollback" ) );
    s.getTransaction().commit();
    s.close();

    s = getSessionFactory().openSession();
    s.getTransaction().begin();
    PersonWithBrokenSocialSecurityNumber entity = (PersonWithBrokenSocialSecurityNumber) s.get( PersonWithBrokenSocialSecurityNumber.class, Long.valueOf( 2 ) );
    Assert.assertNotNull( entity );
    s.delete( entity );
    s.getTransaction().commit();
    s.close();
    Assert.assertNull( "unexpected exception detected", errorHandler.getLastException() );
View Full Code Here

TOP

Related Classes of org.hibernate.search.test.embedded.depth.PersonWithBrokenSocialSecurityNumber

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.