Examples of HasUnencodedStringPkOneToManyBidirChildrenJPA


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

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

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

  public void testUnencodedStringPkOneToManyBidirChildren_NoTxn() throws Exception {
    testUnencodedStringPkOneToManyBidirChildren(NEW_EM_START_END);
  }
  private void testUnencodedStringPkOneToManyBidirChildren(StartEnd startEnd)
      throws Exception {
    HasUnencodedStringPkOneToManyBidirChildrenJPA
        pojo = new HasUnencodedStringPkOneToManyBidirChildrenJPA();
    pojo.setId("yar");
    HasUnencodedStringPkOneToManyBidirChildrenJPA.ChildA
        a = new HasUnencodedStringPkOneToManyBidirChildrenJPA.ChildA();
    pojo.setChildAList(Utils.newArrayList(a));
    startEnd.start();
    em.persist(pojo);
    startEnd.end();
    startEnd.start();
    pojo = em.find(HasUnencodedStringPkOneToManyBidirChildrenJPA.class, pojo.getId());
    assertEquals(1, pojo.getChildAList().size());
    assertEquals(pojo, pojo.getChildAList().get(0).getParent());
    startEnd.end();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.