-
Notifications
You must be signed in to change notification settings - Fork 184
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
Examples of using relationships during create / update #144
Comments
I'm also curious about this. I'm currently giving
And was assuming that it'd be parse on init of my JsonApiClient::Resurce for saving. But haven't had any luck. Any helper here would be greatly appreciated. Cheers, |
@garytaylor There are some examples of this in the tests: I believe given
You should be able to do:
|
I can see how to save things in relationships, and it works, but I can't get them back again. Taking the above example. If I were to do
Doesn't return the authors that were added, just the path to the relationships. So how do I find the authors related to the resource? |
@JohnSmall does it work if you do something like |
Whilst the relationships work find and are well documented for reading - I am finding that I really do not know what I am doing when trying to use them during creation / updating of a resource. I was expecting this to work :-
This is assuming that a forum has many posts
Please can you add some examples to the readme to explain how things like this should be done ? I am assuming now that it has something to do with the "relationships" method but can't be sure.
Thanks
Gary
The text was updated successfully, but these errors were encountered: