QueryResult result = s.createQueryCursor("select * FROM Activity as e LEFT JOIN e.account as a WHERE e.numTimes < 15 and (e.account = null or a.isActive = false)", 50);
List<ViewInfo> views = result.getViews();
Cursor<IndexColumnInfo> cursor = result.getCursor();
ViewInfo viewAct = views.get(0);
ViewInfo viewAcc = views.get(1);
String alias1 = viewAct.getAlias();
String alias2 = viewAcc.getAlias();
Assert.assertEquals("e", alias1);
Assert.assertEquals("a", alias2);
Assert.assertTrue(cursor.next());
compareKeys(cursor, viewAct, viewAcc, "act1", "acc1");