odata-client-php
odata-client-php copied to clipboard
Is it possible to post (insert) an entity and related entities via in one call?
I tried something like this (it didn't work). Is there a way to accomplish this or nah?
$data = [
'foo'=>1,
'bar'=>2,
'RelationshipKey'=>['baz'=>3],
];
$client = new ODataClient($url);
$client->query()->expand('RelationshipKey')->post('EntityName', $data);
Have you tried it with just the call to post
and omitting expand
?