@Test public void test_Query_JPQL_2_1_002() throws Exception { // Select e // From Employee e Join TREAT(e.projects LargeProject) lp StateObjectTester selectStatement = selectStatement( select(variable("e")), from("Employee", "e", join(treat("e.projects", "LargeProject"), "lp"))); testQuery(JPQLQueries2_1.query_002(), selectStatement); }
@Test public void test_Query_JPQL_2_1_001() throws Exception { // Select e // From Employee e Join TREAT(e.projects AS LargeProject) lp // Where lp.budget = :value StateObjectTester selectStatement = selectStatement( select(variable("e")), from("Employee", "e", join(treatAs("e.projects", "LargeProject"), "lp")), where(path("lp.budget").equal(inputParameter(":value")))); testQuery(JPQLQueries2_1.query_001(), selectStatement); }