Method getAllViewsCursor() is not returning proper results with test data. As the Account and Activity has many-to-many relationship now, the below query with null clause is not giving actual result
select * FROM Activity as e INNER JOIN e.account as a WHERE e.numTimes < 15 and (e.account = null or a.isActive = false)
the act5 should have null value for account while act7 should have acc1. While it is reversed and test is failing.
You may try adding below line in TestJoins.java’s testOuterJoinWithNullClause() method in the end of the method.
rows.next();
List<TypedRow> joinedRow1 = rows.getCurrent();
TypedRow typedRow1 = joinedRow1.get(0);
TypedRow theJoinedRow1 = joinedRow1.get(1);
log.info("joinedRow1= "+joinedRow1);
Assert.assertEquals("e", typedRow1.getView().getAlias());
Assert.assertEquals("act5", typedRow1.getRowKeyString());
Assert.assertEquals(null, theJoinedRow1.getRowKey());
rows.next();
List<TypedRow> joinedRow2 = rows.getCurrent();
TypedRow typedRow2 = joinedRow2.get(0);
TypedRow theJoinedRow2 = joinedRow2.get(1);
log.info("joinedRow1= "+joinedRow2);
Assert.assertEquals("e", typedRow2.getView().getAlias());
Assert.assertEquals("act7", typedRow2.getRowKeyString());
Assert.assertEquals("acc1", theJoinedRow2.getRowKey());
UPDATE: This bug is now fixed in the master branch. enjoy.
hmmm, you found a good bug in the ad-hoc interface (This works in the NoSqlNamedQueries just fine, just not the ad-hoc). I will update the answer once I have this fixed.