qCompetition.closeAll();
Iterator itExtent = null;
Iterator itTp = null;
Extent extent = pm.getExtent(Competition.class, false);
itExtent = extent.iterator();
while(itExtent.hasNext()) {
comp = (Competition)itExtent.next();
logger.log(BasicLevel.DEBUG, "Competition: id=" + comp.getId() + ", tps=" + comp.getTrackpoints().toString());
itTp = comp.getTrackpoints().iterator();
while(itTp.hasNext()){
Trackpoint tp = (Trackpoint) itTp.next();
logger.log(BasicLevel.DEBUG, "Trackpoint: id_order=" + tp.getId_order() + ", id_competition=" + tp.getId_competition() );
}
}
extent.closeAll();
pm.close();
}