-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.0_CSD01
-
Fix Version/s: V4.0_CSD02
-
Component/s: Protocol
-
Labels:None
-
Environment:
[Applied]
-
Proposal:
-
Resolution:
It is conventional to define primary key properties (and other properties such as "creationTime") as non-nullable.
However if properties (such as primary keys) are server-generated, the client cannot provide an appropriate initial value in POST.
The spec appears to be silent on this issue.
What should be done?
(1) Define the properties as nullable, and require the client to pass null values on POST.
(2) Define the properties as nullable, and allow the client to omit them from the payload (even for a "complete" entity) on POST.
(3) Define the properties as non-nullable, and require the client to pass junk values on POST.
(4) Define the properties as non-nullable, and allow the client to omit them from the payload (even for a "complete" entity) on POST.
It might help to understand what variations are supported (or "intended" to be supported) by OData V1-V3 in this respect, before we proceed to make a poposal for V4.