setRoot(r.getTargetEntity());
// chain query and entity qualifiers
Expression queryQualifier = parentQuery.getQualifier();
Expression entityQualifier = (inheritanceTree != null) ? inheritanceTree
.qualifierForEntityAndSubclasses() : entity.getDeclaredQualifier();
if (entityQualifier != null) {
queryQualifier = (queryQualifier != null) ? queryQualifier
.andExp(entityQualifier) : entityQualifier;