pojoEntity.setProperty("flightsByOrigAndId", Utils.newArrayList(flightEntity2.getKey(), flightEntity1.getKey(), flightEntity3.getKey()));
pojoEntity.setProperty("hasIndexColumn", Utils.newArrayList(explicitIndexEntity3.getKey(), explicitIndexEntity2.getKey(), explicitIndexEntity1.getKey()));
ds.put(pojoEntity);
startEnd.start();
HasOneToManyWithOrderByJDO pojo = pm.getObjectById(
pojoClass, KeyFactory.keyToString(pojoEntity.getKey()));
assertNotNull(pojo);
assertNotNull(pojo.getFlightsByOrigAndDest());
assertEquals(3, pojo.getFlightsByOrigAndDest().size());
assertEquals("name 2", pojo.getFlightsByOrigAndDest().get(0).getName());
assertEquals("name 0", pojo.getFlightsByOrigAndDest().get(1).getName());
assertEquals("name 1", pojo.getFlightsByOrigAndDest().get(2).getName());
assertNotNull(pojo.getFlightsByIdAndOrig());
assertEquals(3, pojo.getFlightsByIdAndOrig().size());
assertEquals("name 0", pojo.getFlightsByIdAndOrig().get(0).getName());
assertEquals("name 2", pojo.getFlightsByIdAndOrig().get(1).getName());
assertEquals("name 1", pojo.getFlightsByIdAndOrig().get(2).getName());
assertNotNull(pojo.getFlightsByOrigAndId());
assertEquals(3, pojo.getFlightsByOrigAndId().size());
assertEquals("name 2", pojo.getFlightsByOrigAndId().get(0).getName());
assertEquals("name 1", pojo.getFlightsByOrigAndId().get(1).getName());
assertEquals("name 0", pojo.getFlightsByOrigAndId().get(2).getName());
assertNotNull(pojo.getHasIndexColumn());
assertEquals(3, pojo.getHasIndexColumn().size());
assertEquals(explicitIndexEntity3.getKey(), pojo.getHasIndexColumn().get(0).getId());
assertEquals(explicitIndexEntity2.getKey(), pojo.getHasIndexColumn().get(1).getId());
assertEquals(explicitIndexEntity1.getKey(), pojo.getHasIndexColumn().get(2).getId());
startEnd.end();
}