Provide support for contextually-readonly properties, and odata services which don't follow Foreign Key BINDs#5
Provide support for contextually-readonly properties, and odata services which don't follow Foreign Key BINDs#5jonnerd154 wants to merge 8 commits intoeblis:masterfrom
Conversation
…hout_bind Include Foreign Key in requests
…ttributes Provide list of Entity properties to omit from requests
|
I can't test it with SAP as I don't have access to it. Can you please test and see if it works for you? |
|
Can you please check if the properties SAP fails for are marked as Nullable=false ? |
|
Your changes are great: type hints, documentation, improve code reuse, and the False case is smart. Thank you. I pushed another commit that prevents calling .len() on a bool when omit_null_props=False. Regarding the Nullable=False fields, unfortunately that's not the issue. For example, the Orders entity has its CardCode property (the foreign key to BusinessPartner aka "Customer") spec'd as Nullable=False, and that validation works correctly: if it's null, the service returns an error. The problem is that I get an error if I send property I think this could be best solved by improving the behavior of properties' Thoughts? I'd be happy to take a crack at it if you agree. |
|
Sounds good. If you have the time go ahead. |
Comment out logging of POST request and payload
Comment out logging of the payload in PATCH requests.
These tweaks solve issues with support for SAP Business One's Service Layer. All edits welcome. I don't believe these changes have adverse impacts for other services, and are likely workarounds for problems in SAP B1. They solved my problems, but YMMV - more testing encouraged.