List<SaveMethodInPeer> loadedList
= SaveMethodInPeerPeer.doSelect(criteria);
assertEquals(1, loadedList.size());
assertEquals(
1,
new CountHelper().count(SaveMethodInPeerPeer.getTableMap()));
criteria = new Criteria()
.where(SaveMethodInPeerFkPeer.SAVE_METHOD_IN_PEER_ID, toSave.getId())
.and(SaveMethodInPeerFkPeer.ID, child1.getId())
.and(SaveMethodInPeerFkPeer.PAYLOAD, "payload 1");
List<SaveMethodInPeerFk> child1List
= SaveMethodInPeerFkPeer.doSelect(criteria);
assertEquals(1, child1List.size());
assertEquals(
1,
new CountHelper().count(SaveMethodInPeerFkPeer.getTableMap()));
criteria = new Criteria()
.where(SaveMethodInObjectFkPeer.SAVE_METHOD_IN_PEER_ID, toSave.getId())
.and(SaveMethodInObjectFkPeer.ID, child2.getId())
.and(SaveMethodInObjectFkPeer.PAYLOAD, "payload 2");
List<SaveMethodInObjectFk> child2List
= SaveMethodInObjectFkPeer.doSelect(criteria);
assertEquals(1, child2List.size());
assertEquals(
1,
new CountHelper().count(
SaveMethodInObjectFkPeer.getTableMap()));
}