[OLINGO-487] Make property name known for proxy error case
This commit is contained in:
parent
7df31c58c3
commit
e79f628386
|
@ -140,19 +140,19 @@ public abstract class AbstractUtility {
|
||||||
return getNavigationBindings(sourceEntityType, property);
|
return getNavigationBindings(sourceEntityType, property);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// maybe source entity type without entity set ...
|
// maybe source entity type without entity set ...
|
||||||
return getNavigationBindings(property.getType());
|
return getNavigationBindings(property.getType(), property.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private NavPropertyBindingDetails getNavigationBindings(final EdmStructuredType type) {
|
private NavPropertyBindingDetails getNavigationBindings(final EdmStructuredType type, String propertyName) {
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
throw new IllegalStateException("Invalid navigation property");
|
throw new IllegalStateException("No EntitySet defined. Invalid navigation property: " + propertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return new NavPropertyBindingDetails(edm, type);
|
return new NavPropertyBindingDetails(edm, type);
|
||||||
} catch (IllegalStateException ignore) {
|
} catch (IllegalStateException ignore) {
|
||||||
return getNavigationBindings(type.getBaseType());
|
return getNavigationBindings(type.getBaseType(), propertyName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue