[OLINGO-609] Fix: ODataJsonDeserializer

This commit is contained in:
Christian Holzer 2015-03-31 12:52:02 +02:00
parent 62f100148a
commit 92e201b0a8
2 changed files with 2 additions and 3 deletions

View File

@ -290,7 +290,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
if (jsonNode != null) {
EdmNavigationProperty edmNavigationProperty = edmEntityType.getNavigationProperty(navigationPropertyName);
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.",
DeserializerException.MessageKeys.INVALID_NULL_PROPERTY, navigationPropertyName);
}

View File

@ -658,8 +658,7 @@ public class PropertyProvider {
public static final NavigationProperty collectionNavPropertyETTwoPrimMany_ETTwoPrim = new NavigationProperty()
.setName("NavPropertyETTwoPrimMany")
.setType(EntityTypeProvider.nameETTwoPrim)
.setCollection(true)
.setNullable(false);
.setCollection(true);
public static final NavigationProperty collectionNavPropertyETAllPrimMany_ETAllPrim = new NavigationProperty()
.setName("NavPropertyETAllPrimMany")