use of dev.morphia.mapping.NotMappableException in project morphia by mongodb.
the class PathTarget method resolveProperty.
@Nullable
private PropertyModel resolveProperty(String segment) {
if (context != null) {
PropertyModel model = context.getProperty(segment);
if (model == null) {
Iterator<EntityModel> subTypes = context.getSubtypes().iterator();
while (model == null && subTypes.hasNext()) {
context = subTypes.next();
model = resolveProperty(segment);
}
}
if (model != null) {
try {
context = mapper.getEntityModel(model.getNormalizedType());
} catch (NotMappableException ignored) {
context = null;
}
}
return model;
} else {
return null;
}
}
Aggregations