Hi, there is currently a flag in the ODataSerializerOptions which is called writeOnlyReferences. This flag can be used when calling the "entityCollection" and the "entity" methods. The flag then results in a complete change of behavior and writes the references for an entity rather than the payload itself.
I would like to propose to remove this flag and use the dedicated "reference" and "referenceCollection" methods in this case as they have been made for that. These methods can also construct the self link if the entity ID is not set. So they are more robust. Another benefit would be that the EntitySerializer is not used out of context and does not have unnecessary code inside. If nobody objects I would make the above changes and push them. Best Regards, Christian