Package com.google.appengine.datanucleus.test.jdo

Examples of com.google.appengine.datanucleus.test.jdo.HasMultipleBidirChildrenJDO


    switchDatasource(PersistenceManagerFactoryName.nontransactional);
    getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
    testMultipleBidirChildren(NEW_PM_START_END);
  }
  private void testMultipleBidirChildren(StartEnd startEnd) {
    HasMultipleBidirChildrenJDO pojo = new HasMultipleBidirChildrenJDO();

    HasMultipleBidirChildrenJDO.BidirChild1 c1 = new HasMultipleBidirChildrenJDO.BidirChild1();
    HasMultipleBidirChildrenJDO.BidirChild2 c2 = new HasMultipleBidirChildrenJDO.BidirChild2();

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

    startEnd.start();
    pm.makePersistent(pojo);
    startEnd.end();
    startEnd.start();
    pojo = pm.getObjectById(HasMultipleBidirChildrenJDO.class, pojo.getId());
    assertEquals(1, pojo.getChild1().size());
    assertEquals(1, pojo.getChild2().size());
    startEnd.end();
  }
View Full Code Here

TOP

Related Classes of com.google.appengine.datanucleus.test.jdo.HasMultipleBidirChildrenJDO

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.