Package tmp

Examples of tmp.Item


  @Test
  @Transactional
  public void testSaveOrderWithItems() throws Exception {
    Session session = sessionFactory.getCurrentSession();
    Order order = new Order();
    order.getItems().add(new Item());
    session.save(order);
    session.flush();
    assertNotNull(order.getId());
  }
View Full Code Here


  @Test
  @Transactional
  public void testSaveAndGet() throws Exception {
    Session session = sessionFactory.getCurrentSession();
    Order order = new Order();
    order.getItems().add(new Item());
    session.save(order);
    session.flush();
    // Otherwise the query returns the existing order (and we didn't set the
    // parent in the item)...
    session.clear();
View Full Code Here

  @Test
  @Transactional
  public void testSaveAndFind() throws Exception {
    Session session = sessionFactory.getCurrentSession();
    Order order = new Order();
    Item item = new Item();
    item.setProduct("foo");
    order.getItems().add(item);
    session.save(order);
    session.flush();
    // Otherwise the query returns the existing order (and we didn't set the
    // parent in the item)...
View Full Code Here

TOP

Related Classes of tmp.Item

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.