Skip to content

Conversation

2inqui
Copy link

@2inqui 2inqui commented Jun 12, 2017

When having relationships to the same content_type which are included in data attribute the parsing is now linking them.

2inqui added 2 commits June 6, 2017 13:43
same type of resources.

For example having a response like:
```
{
  "data": [
    {
      "id": "29",
      "type": "ediary_entry_groups",
      "attributes": {
        "name": "Record Fasting",
        "permanent_link": "fasting",
        "position": 2,
        "category": null,
        "created_at": "2017-06-02T20:06:16Z",
        "updated_at": "2017-06-02T20:06:16Z"
      },
      "relationships": {
        "ediary_entries": {
          "data": []
        },
        "entry_templates": {
          "data": []
        },
        "child_entry_groups": {
          "data": [
            {
              "id": "30",
              "type": "ediary_entry_groups"
            },
            {
              "id": "31",
              "type": "ediary_entry_groups"
            },
            {
              "id": "32",
              "type": "ediary_entry_groups"
            },
            {
              "id": "33",
              "type": "ediary_entry_groups"
            }
          ]
        },
        "parent_entry_group": {
          "data": null
        }
      }
    },
...
```

The relationships are not being mapped because they are inside data, not
included as we expect.
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

Successfully merging this pull request may close these issues.

1 participant