2012-09-26 23 views
1

方法getAllViewsCursor()未返回测试数据的正确结果。由于帐户和活动现在具有多对多关系,因此以下带有空子句的查询不会给出实际结果testOuterJoinWithNullClause()在一个条件下失败

select * FROM Activity as e INNER JOIN e.account as WHERE e.numTimes < 15 and( e.account = null或a.isActive = false)

act5应该对帐户有空值,而act7应该有acc1。虽然它被颠倒过来并且测试失败。 您可以尝试在方法末尾的TestJoins.java的testOuterJoinWithNullClause()方法的下面一行中添加。

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()); 

回答

1

UPDATE:此错误现在已在主分支中修复。请享用。

嗯,你在ad-hoc接口中找到了一个很好的bug(这在NoSqlNamedQueries中工作得很好,只是不是临时的)。一旦我修好了,我会更新答案。