Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
(Java) V4 4.2.0
-
None
Description
Apache Olingo isn't compliant with OData 4 feature "For nullable single-valued navigation properties the value null may be used to remove the relationship".
I believe if the navigation property is a single entity (to one relationship) and it is defined as nullable, it can be null, as sais at OData documentation ("For nullable single-valued navigation properties the value null may be used to remove the relationship.").
As example, we can use org.apache.olingo.server.core.deserializer.json.ODataJsonDeserializerEntityTest.bindingOperationNullOnToOne():
@Test
public void bindingOperationNullOnToOne() throws Exception {
String entityString =
"
";
expectException(entityString, "ETAllPrim",
DeserializerException.MessageKeys.INVALID_NULL_ANNOTATION);
}
I believe that if we define NavPropertyETTwoPrimOne as nullable, it shouldn't throw INVALID_NULL_ANNOTATION exception.