Package org.hibernate.ogm.backendtck.simpleentity

Examples of org.hibernate.ogm.backendtck.simpleentity.Helicopter


    int numInsert = 3;
    int numUpdate = 1;

    Session session = openSession();
    session.beginTransaction();
    Helicopter helicopter = helicopter( "H_tmp" );
    session.persist( helicopter );
    for ( int i = 0; i < numInsert; i++ ) {
      session.persist( helicopter( "H_" + i ) );
    }
    helicopter.setName( "H_" + numInsert );
    session.getTransaction().commit();
    session.close();

    Assertions.assertThat( LeakingMongoDBDialect.queueSize ).isEqualTo( numUpdate + ( numInsert + 1 ) );
  }
View Full Code Here


    Session session = openSession();
    session.beginTransaction();
    List<Helicopter> helicopters = new ArrayList<Helicopter>();
    for ( int i = 0; i < numInsert; i++ ) {
      Helicopter helicopter = helicopter( "H_" + i );
      session.persist( helicopter );
      helicopters.add( helicopter );
    }
    for ( Helicopter helicopter : helicopters ) {
      session.delete( helicopter );
View Full Code Here

    session.getTransaction().commit();
    session.close();
  }

  private Helicopter helicopter(String name) {
    Helicopter helicopter = new Helicopter();
    helicopter.setName( name );
    return helicopter;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.backendtck.simpleentity.Helicopter

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.