[OLINGO-609] Fix: ODataJsonDeserializer
This commit is contained in:
parent
62f100148a
commit
92e201b0a8
|
@ -290,7 +290,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
|
||||||
if (jsonNode != null) {
|
if (jsonNode != null) {
|
||||||
EdmNavigationProperty edmNavigationProperty = edmEntityType.getNavigationProperty(navigationPropertyName);
|
EdmNavigationProperty edmNavigationProperty = edmEntityType.getNavigationProperty(navigationPropertyName);
|
||||||
boolean isNullable = edmNavigationProperty.isNullable();
|
boolean isNullable = edmNavigationProperty.isNullable();
|
||||||
if (jsonNode.isNull() && !isNullable) {
|
if ((jsonNode.isNull() && !isNullable) || (jsonNode.isNull() && edmNavigationProperty.isCollection())) {
|
||||||
throw new DeserializerException("Property: " + navigationPropertyName + " must not be null.",
|
throw new DeserializerException("Property: " + navigationPropertyName + " must not be null.",
|
||||||
DeserializerException.MessageKeys.INVALID_NULL_PROPERTY, navigationPropertyName);
|
DeserializerException.MessageKeys.INVALID_NULL_PROPERTY, navigationPropertyName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -658,8 +658,7 @@ public class PropertyProvider {
|
||||||
public static final NavigationProperty collectionNavPropertyETTwoPrimMany_ETTwoPrim = new NavigationProperty()
|
public static final NavigationProperty collectionNavPropertyETTwoPrimMany_ETTwoPrim = new NavigationProperty()
|
||||||
.setName("NavPropertyETTwoPrimMany")
|
.setName("NavPropertyETTwoPrimMany")
|
||||||
.setType(EntityTypeProvider.nameETTwoPrim)
|
.setType(EntityTypeProvider.nameETTwoPrim)
|
||||||
.setCollection(true)
|
.setCollection(true);
|
||||||
.setNullable(false);
|
|
||||||
|
|
||||||
public static final NavigationProperty collectionNavPropertyETAllPrimMany_ETAllPrim = new NavigationProperty()
|
public static final NavigationProperty collectionNavPropertyETAllPrimMany_ETAllPrim = new NavigationProperty()
|
||||||
.setName("NavPropertyETAllPrimMany")
|
.setName("NavPropertyETAllPrimMany")
|
||||||
|
|
Loading…
Reference in New Issue