nullAllowed = mapping.isForeignReferenceMapping();
}
}
// No mapping is defined for the single path, check for a query key
else {
QueryKey queryKey = descriptor.getQueryKeyNamed(path);
if (queryKey != null) {
// Make sure we keep track of its type
if (type != null) {
type[0] = queryContext.calculateQueryKeyType(queryKey);
}
// This will tell us how to create the Expression
collectionMapping = queryKey.isCollectionQueryKey();
// Retrieve the reference descriptor so we can continue traversing the path
if (!last && queryKey.isForeignReferenceQueryKey()) {
ForeignReferenceQueryKey referenceQueryKey = (ForeignReferenceQueryKey) queryKey;
descriptor = queryContext.getDescriptor(referenceQueryKey.getReferenceClass());
}
}
// Nothing was found