r2.setValue(Table2.FIELD_NAME2, "1");
assertEquals(1, r1.compareTo(r2));
r1.setValue(Table1.FIELD_ID1, 1);
assertEquals(1, r1.compareTo(r2));
r1.setValue(Table1.FIELD_NAME1, "1");
assertEquals(0, r1.compareTo(r2));
r2.setValue(Table2.FIELD_ID2, null);