Search in sources :

Example 1 with SyntheticAndFactory

use of org.hibernate.hql.internal.ast.util.SyntheticAndFactory in project hibernate-orm by hibernate.

the class HqlSqlWalker method postProcessDML.

protected void postProcessDML(RestrictableStatement statement) throws SemanticException {
    statement.getFromClause().resolve();
    FromElement fromElement = (FromElement) statement.getFromClause().getFromElements().get(0);
    Queryable persister = fromElement.getQueryable();
    // Make #@%$^#^&# sure no alias is applied to the table name
    fromElement.setText(persister.getTableName());
    //		}
    if (persister.getDiscriminatorType() != null || !queryTranslatorImpl.getEnabledFilters().isEmpty()) {
        new SyntheticAndFactory(this).addDiscriminatorWhereFragment(statement, persister, queryTranslatorImpl.getEnabledFilters(), fromElement.getTableAlias());
    }
}
Also used : SyntheticAndFactory(org.hibernate.hql.internal.ast.util.SyntheticAndFactory) FromElement(org.hibernate.hql.internal.ast.tree.FromElement) EntityJoinFromElement(org.hibernate.hql.internal.ast.tree.EntityJoinFromElement) Queryable(org.hibernate.persister.entity.Queryable)

Aggregations

EntityJoinFromElement (org.hibernate.hql.internal.ast.tree.EntityJoinFromElement)1 FromElement (org.hibernate.hql.internal.ast.tree.FromElement)1 SyntheticAndFactory (org.hibernate.hql.internal.ast.util.SyntheticAndFactory)1 Queryable (org.hibernate.persister.entity.Queryable)1