Skip to content
This repository was archived by the owner on Apr 11, 2019. It is now read-only.
This repository was archived by the owner on Apr 11, 2019. It is now read-only.

Relationship's 'meta' object is not being added to request #29

@eduardmartinez

Description

@eduardmartinez

Hi. I was trying to add a meta object into a relationship's object. For example, I have a user object which has many cars but I need to send some extra data about cars. So the request at the end should be like this:

{
  data: {
     attributes: {},
     id: '1',
     type: 'users',
     relationships: {
       'cars': [
          {
             id: '3',
             type: 'cars',
             meta: {
                wherever: 'happiness'
             }
          }
       ]
     }
  }
}

I tried to do:

//carElement has id:'3' and type:'cars'
carElement.form.meta = { wherever: 'happiness' };

user.form.link('cars', carElement);
user.save();

But I noticed when the request is sent, it doesn't send meta in any place.

How could I make this work?

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions