} else
rel = relMapping.getDescribedType();
// if the path represents a relation, get its class indicator and
// make sure it's joined down to its base type
Discriminator discrim = (relMapping == null
|| !relMapping.getDescribedType().isAssignableFrom(_cls))
? null : relMapping.getDiscriminator();
ClassMapping mapping = null;
Joins joins = pathState.joins;
if (discrim != null) {
// cache mapping for cast
MappingRepository repos = ctx.store.getConfiguration().
getMappingRepositoryInstance();
mapping = repos.getMapping(_cls, ctx.store.getContext().
getClassLoader(), false);
// if not looking for a PC, don't bother with indicator
if (mapping == null || !discrim.hasClassConditions(mapping, true))
discrim = null;
else {
ClassMapping owner = discrim.getClassMapping();
ClassMapping from, to;
if (relMapping.getDescribedType().isAssignableFrom
(owner.getDescribedType())) {
from = owner;
to = relMapping;