if (query.getRoot() instanceof Class) {
return null;
}
// resolve entity
QueryEngine parent = (QueryEngine) path.firstInstanceOf(QueryEngine.class);
if (parent == null) {
return null;
}
QueryMetadata metadata = query.getMetaData(parent.getEntityResolver());
Entity entity = metadata.getObjEntity();
if (entity == null) {
entity = metadata.getDbEntity();
}