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

Return entries although their related objects are missing #43

Closed
jirzi0 opened this issue May 22, 2020 · 1 comment
Closed

Return entries although their related objects are missing #43

jirzi0 opened this issue May 22, 2020 · 1 comment

Comments

@jirzi0
Copy link
Contributor

jirzi0 commented May 22, 2020

Is your feature request related to a problem? Please describe.
I want to get eg. documents with related models, however, if the related entry is not present, then the whole "row" goes missing. If I call like so:

{
    "include": [{
        "relation": "members"
    }]
}

then all the results than do not have a corresponding member don't get returned at all.

Describe the solution you'd like
Return all results, even without the related models.
Instead of the missing object, return something else: null, string (n/A), ...(?).

Describe alternatives you've considered
Throw an error.

Additional context
Not something crazy important but it feels awkward.

@jirzi0 jirzi0 changed the title Return entries although their related are missing, instead of "hiding" the entire thing. Return entries although their related objects are missing, instead of "hiding" the entire thing. May 22, 2020
@jirzi0 jirzi0 changed the title Return entries although their related objects are missing, instead of "hiding" the entire thing. Return entries although their related objects are missing May 22, 2020
@henrikjohansson712
Copy link
Collaborator

I've just pushed a change that should take care of this. Let me know if it works for you.

@jirzi0 jirzi0 closed this as completed Jun 8, 2020
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