use of org.apache.cayenne.testdo.qualified.Qualified2 in project cayenne by apache.
the class CDOQualifiedEntitiesIT method testReadToMany.
@Test
public void testReadToMany() throws Exception {
if (accessStackAdapter.supportsNullBoolean()) {
createReadToManyDataSet();
List<Qualified1> roots = ObjectSelect.query(Qualified1.class).select(context);
assertEquals(1, roots.size());
Qualified1 root = roots.get(0);
assertEquals("OX1", root.getName());
List<Qualified2> related = root.getQualified2s();
assertEquals(1, related.size());
Qualified2 r = related.get(0);
assertEquals("OY1", r.getName());
}
}
use of org.apache.cayenne.testdo.qualified.Qualified2 in project cayenne by apache.
the class CDOQualifiedEntitiesIT method testReadToOne.
@Test
public void testReadToOne() throws Exception {
if (accessStackAdapter.supportsNullBoolean()) {
createReadToOneDataSet();
List<Qualified2> roots = ObjectSelect.query(Qualified2.class).select(context);
assertEquals(1, roots.size());
Qualified2 root = roots.get(0);
assertEquals("OY1", root.getName());
Qualified1 target = root.getQualified1();
assertNull(target);
}
}
Aggregations