Skip to content

Are the docs incorrect for including related data? #311

@erichaus

Description

@erichaus

Hello,

Coming back to this package after using ember-django-adapter for awhile and while trying to figure out how to include side-loaded related data, I notice that the docs say it is handled automatically. However in practice out-of-the-box this package does not include the included key with the related data unless I explicitly declare JSONAPIMeta like so:

class UserSerializer(ModelSerializer):
    account = AccountSerializer(read_only=True)

    class JSONAPIMeta:
        included_resources = ['account']

Is this by design or is something not hooked up right? For nested/related serializers should the docs explain that you must include the included_resources property? I was only able to find this via stackoverflow and another issue on here.

This page is the only page in the docs that even references the property included_resources but does nothing to explain how to use it.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions