MentaBean

Compare Revisions

Ignore whitespace Rev 204 → Rev 205

/trunk/src/test/java/org/mentabean/jdbc/QueryBuilderTest.java
1293,6 → 1293,31
.closePar()
.executeQuery().size());
assertEquals(2, builder
.select(p, e, c)
.from(p)
.leftJoin(c).on(c.pxy().getId()).eq(p.pxy().getCompany().getId())
.eqProperty(p.pxy().getCompany())
.leftJoin(e).on(e.pxy().getNumber()).eq(p.pxy().getEmployee().getNumber())
.eqProperty(p.pxy().getEmployee())
.where()
.openPar()
.clauseIf(false, c.pxy().getName())
.condition(new Like("Google"))
.or()
.clauseIf(false, c.pxy().getName())
.condition(new Like("Oracle"))
.closePar()
.or()
.openPar()
.clauseIf(true, c.pxy().getName())
.condition(new Like("Oracle"))
.and()
.clauseIf(false, c.pxy().getName())
.condition(new Like("Google"))
.closePar()
.executeQuery().size());
assertEquals(0, builder
.select(p, e, c)
.from(p)