public void testBetween() {
DomainObject c = qb.createQueryDefinition(CreditCard.class);
DomainObject t = c.join("transactionHistory");
c.select(t).where(c.get("holder").get("name").equal("John Doe")
.and(t.index().between(0, 9)));
String jpql = "select t from CreditCard c JOIN c.transactionHistory t" +
" where c.holder.name = 'John Doe' AND INDEX(t) " +
" BETWEEN 0 AND 9";