Package com.foreach.across.test.modules.hibernate2

Examples of com.foreach.across.test.modules.hibernate2.Hibernate2Module


      return new Hibernate1Module();
    }

    @Bean
    public Hibernate2Module hibernate2Module() {
      return new Hibernate2Module();
    }
View Full Code Here


  @Test
  public void otherModuleTransactional() {
    assertNull( userRepository.getUserWithId( 1 ) );

    User user = new User( 1, "user 1" );
    userRepository.save( user );

    closeSession();
    openSession();

    User other = userRepository.getUserWithId( 1 );
    assertNotNull( other );
    assertEquals( user, other );
  }
View Full Code Here

  }

  @Test
  public void combinedSave() {
    Product product = new Product( 2, "product 2" );
    User user = new User( 2, "user 2" );

    userRepository.save( user, product );

    closeSession();
    openSession();

    User otherUser = userRepository.getUserWithId( 2 );
    assertNotNull( otherUser );
    assertEquals( user, otherUser );

    Product otherProduct = productRepository.getProductWithId( 2 );
    assertNotNull( otherProduct );
View Full Code Here

TOP

Related Classes of com.foreach.across.test.modules.hibernate2.Hibernate2Module

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.