[OLINGO-315] handle the case of zero container in EDM schema
This commit is contained in:
parent
8ad297f9af
commit
80c2f83acc
|
@ -347,7 +347,7 @@ public abstract class AbstractODataBinder implements CommonODataBinder {
|
|||
if (contextURL.getDerivedEntity() == null) {
|
||||
for (EdmSchema schema : edm.getSchemas()) {
|
||||
final EdmEntityContainer container = schema.getEntityContainer();
|
||||
|
||||
if(container != null) {
|
||||
EdmBindingTarget bindingTarget = container.getEntitySet(contextURL.getEntitySetOrSingletonOrType());
|
||||
if (bindingTarget == null) {
|
||||
bindingTarget = container.getSingleton(contextURL.getEntitySetOrSingletonOrType());
|
||||
|
@ -365,6 +365,7 @@ public abstract class AbstractODataBinder implements CommonODataBinder {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type == null) {
|
||||
type = new EdmTypeInfo.Builder().setEdm(edm).
|
||||
setTypeExpression(contextURL.getEntitySetOrSingletonOrType()).build().getType();
|
||||
|
|
Loading…
Reference in New Issue