tuomur / python-odata

A simple library for read/write access to OData services
MIT License
79 stars 59 forks source link

Send only dirty values for initial Entity insert #11

Open tuomur opened 7 years ago

tuomur commented 7 years ago

Sending full objects with null values sometimes causes problems when server has read-only values or values that cannot be set at initial POST. Might be better to just send dirty values. @awartani already looked at this in #9

tuomur commented 7 years ago

Another solution may be adding support for "Computed" annotations for properties. The metadata may contain elements like <Annotation Term="Org.OData.Core.V1.Computed" Bool="true" /> for this purpose. On POST/PATCH these properties would be dropped from payload.

tuomur commented 7 years ago

Added Computed properties in bf3351a49a65750c1beb91849be2ad961f764f51. Might need some more testing.