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

Improve to-many relations #17

Merged
merged 10 commits into from
Mar 23, 2017
Merged

Improve to-many relations #17

merged 10 commits into from
Mar 23, 2017

Conversation

lode
Copy link
Owner

@lode lode commented Jun 22, 2015

This implements #3 and fixes some issues raised there.

@Pierozi
Copy link
Contributor

Pierozi commented Jun 29, 2015

Just a little bug and then we should be good.

The relationships in included are not followed.

https://github.com/lode/jsonapi/blob/master/src/response.php#L173

//unset($resource_array['relationships'], $resource_array['meta']);
$this->included_resources = array_merge($this->included_resources, $resource->included_resources);

if we comment the unset and add an merge of included at end of method, then we can have a deep included relationship working.

And have an Output JSON Like this https://gist.github.com/Pierozi/6361d7f80d6379df472b

@lode
Copy link
Owner Author

lode commented Mar 8, 2017

I'm sorry it took so long, but fyi, I'm going to merge and release this PR.

I added a separate issue for the bug you noted, as it is not a change from this PR. I plan to pick it up directly though.

@lode lode merged commit ee376b3 into master Mar 23, 2017
@lode lode deleted the improve-relation-input branch March 23, 2017 13:23
@lode
Copy link
Owner Author

lode commented Mar 23, 2017

This PR and a fix for the related #25 are now in the v1.4.0 & v1.4.1 releases.

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

Successfully merging this pull request may close these issues.

None yet

2 participants