Affects Version/s: V4.01_OS
Fix Version/s: V4.01_ERRATA01
Consider this CSDL.
If a client sends this request:
then per Protocol 11.4.2 "Create an Entity":
The entity representation MAY include references to existing entities as well as content for new related entities, but MUST NOT contain content for existing related entities.
... the above POST request MUST be interpreted as a deep insert. The client cannot portably create a CustomerPhoto (except via a bind operation) as any attempt to specify its key (via the customer it relates to) will be interpreted as a deep insert.
If we were to relax the language in section 11.4.2 to allow an interpretation of relating a CustomerPhoto to an existing Customer (rather than also creating the Customer by deep insert), then the specification is now ambiguous in regard to the correct interpretation of the above example payload.
Similar issues apply to 184.108.40.206 "Update Related Entities When Updating an Entity"
If a nested entity has the same id or key fields as an existing entity, the existing entity is updated according to the semantics of the PUT or PATCH request.
Using the same payload for updating an existing CustomerPhoto by PUT (in an attempt to link the photo to a different Customer) would be interpreted as a deep update to PUT the newly related customer (clearing its non-key properties, if any).
The key point of discussing the issue is to work out how to discourage implementers from treating inline relationships (with only the related entity's key) as a substitute for bind operations while at the same time not implementing bind operations the standard way.