Package com.google.appengine.datanucleus.test.jpa

Examples of com.google.appengine.datanucleus.test.jpa.HasLongPkOneToManyBidirChildrenJPA


  public void testLongPkOneToManyBidirChildren_NoTxn() throws Exception {
    testLongPkOneToManyBidirChildren(NEW_EM_START_END);
  }
  private void testLongPkOneToManyBidirChildren(StartEnd startEnd)
      throws Exception {
    HasLongPkOneToManyBidirChildrenJPA pojo = new HasLongPkOneToManyBidirChildrenJPA();
    HasLongPkOneToManyBidirChildrenJPA.ChildA
        a = new HasLongPkOneToManyBidirChildrenJPA.ChildA();
    pojo.setChildAList(Utils.newArrayList(a));
    startEnd.start();
    em.persist(pojo);
    startEnd.end();
    startEnd.start();
    pojo = em.find(HasLongPkOneToManyBidirChildrenJPA.class, pojo.getId());
    assertEquals(1, pojo.getChildAList().size());
    assertEquals(pojo, pojo.getChildAList().get(0).getParent());
    startEnd.end();
  }
View Full Code Here


  public void testLongPkOneToManyBidirChildren_NoTxn() throws Exception {
    testLongPkOneToManyBidirChildren(NEW_EM_START_END);
  }
  private void testLongPkOneToManyBidirChildren(StartEnd startEnd)
      throws Exception {
    HasLongPkOneToManyBidirChildrenJPA pojo = new HasLongPkOneToManyBidirChildrenJPA();
    HasLongPkOneToManyBidirChildrenJPA.ChildA
        a = new HasLongPkOneToManyBidirChildrenJPA.ChildA();
    pojo.setChildAList(Utils.newArrayList(a));
    startEnd.start();
    em.persist(pojo);
    startEnd.end();
    startEnd.start();
    pojo = em.find(HasLongPkOneToManyBidirChildrenJPA.class, pojo.getId());
    assertEquals(1, pojo.getChildAList().size());
    assertEquals(pojo, pojo.getChildAList().get(0).getParent());
    startEnd.end();
  }
View Full Code Here

TOP

Related Classes of com.google.appengine.datanucleus.test.jpa.HasLongPkOneToManyBidirChildrenJPA

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.