Issues like https://hibernate.atlassian.net/browse/HHH-16494 would not be a problem if the discriminator was part of the table group or table reference which an entity persister produces. I.e. if we ask a SingleTableEntityPersister to create a table group for a subclass, we must also call applyDiscriminator to make sure the discriminator filter is applied. If the table group is joined though applying the discriminator in the join predicate is not quite right and we should rather use a subquery e.g. join (select * from single_table t where t.discrim = ...) |