コード例 #1
0
  private void addOuterJoinOrderByTest() {
    ExpressionBuilder emp = new ExpressionBuilder();

    ReadAllExpressionTest test = new ReadAllOuterJoinExpressionTest(Employee.class, 12);
    test.setName("OuterJoinOrderByTest");
    test.setDescription("Test order by with outer joins");
    ReadAllQuery query = new ReadAllQuery(Employee.class);
    query.addOrdering(emp.getAllowingNull("address").get("city"));
    test.setQuery(query);

    addTest(test);
  }
コード例 #2
0
  private void addOuterJoinAcrossInheritanceTest() {
    ExpressionBuilder emp = new ExpressionBuilder();

    ReadAllExpressionTest test =
        new ReadAllOuterJoinExpressionTest(
            org.eclipse.persistence.testing.models.inheritance.Person.class, 1);
    test.setName("OuterJoinAcrossInheritanceTest");
    test.setDescription("Test joining with outer joins across inheritance");
    ReadAllQuery query =
        new ReadAllQuery(org.eclipse.persistence.testing.models.inheritance.Person.class);

    // This test used to make no sense...
    // query.setSelectionCriteria(emp.getAllowingNull("representitive").get("name").equalOuterJoin("Richard"));
    query.addOrdering(emp.getAllowingNull("representitive").get("name"));
    test.setQuery(query);

    addTest(test);
  }