assertEquals("Query explain with PRIMARY key lessThan should have index PRIMARY", "PRIMARY", indexUsed);
assertEquals("Query explain with PRIMARY key lessThan should have scan type INDEX_SCAN", Query.SCAN_TYPE_INDEX_SCAN, scanType);
}
public void testExplainAfterBindingParametersPrimaryLessThanNull() {
QueryBuilder builder = session.getQueryBuilder();
QueryDomainType<AllPrimitives> dobj = builder.createQueryDefinition(AllPrimitives.class);
dobj.where(dobj.get("id").lessThan(dobj.param("lessThan")));
Query<AllPrimitives> query = session.createQuery(dobj);
query.setParameter("lessThan", null);
Map<String, Object> result = query.explain();
String indexUsed = result.get(Query.INDEX_USED).toString();