Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to post (insert) an entity and related entities via in one call? #107

Open
joey-carlisle4 opened this issue Apr 15, 2022 · 1 comment

Comments

@joey-carlisle4
Copy link

joey-carlisle4 commented Apr 15, 2022

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);
@anderly
Copy link
Member

anderly commented Sep 7, 2023

Have you tried it with just the call to post and omitting expand?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants