Examples of HasOneToManyMultipleBidirChildren


Examples of com.google.appengine.datanucleus.test.jdo.HasPolymorphicRelationsListJDO.HasOneToManyMultipleBidirChildren

  new HasOneToManyMultipleBidirChildren.BidirChildBottom2());
  }
  private void testMultipleBidirChildren(StartEnd startEnd,
      HasOneToManyMultipleBidirChildren.BidirChildTop1 c1,
      HasOneToManyMultipleBidirChildren.BidirChildTop2 c2) {
    HasOneToManyMultipleBidirChildren pojo = new HasOneToManyMultipleBidirChildren();

    pojo.getChild1().add(c1);
    pojo.getChild2().add(c2);

    startEnd.start();
    pm.makePersistent(pojo);
    startEnd.end();
    startEnd.start();
    pojo = pm.getObjectById(HasOneToManyMultipleBidirChildren.class, pojo.getId());
    assertEquals(1, pojo.getChild1().size());
    assertEquals(c1.getId(), pojo.getChild1().get(0).getId());
    assertEquals(c1.getClass(),  pojo.getChild1().get(0).getClass());
    assertEquals(1, pojo.getChild2().size());
    assertEquals(c2.getId(), pojo.getChild2().get(0).getId());
    assertEquals(c2.getClass(),  pojo.getChild2().get(0).getClass());
    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.