cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP Java: Why is property with many ComplexType not optional?

frank_albrecht
Advisor
Advisor
0 Kudos

I defined a complex type with many... see below

entity Tasks.TaskResponses {
key ID : UUID;
content: many Context;
...}  

When I try to create an entity without content property in the request body,  I get an error: "code":"400008","message":"Could not deserialize request payload: The parameter 'content' must not be null."}
How can I make the content property optional?
Thanks

cwedler
Employee
Employee
0 Kudos

The EDMX does not have a way to express whether a collection property as a whole is optional, `Nullable` is only for the collection item.

The Java runtime could interpret null as an empty collection, though…

Accepted Solutions (0)

Answers (0)