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.

Remote add/update object with relationships in only one transaction #38

@pablorsk

Description

@pablorsk

Hi!

We need add/update relational objects but in just only one transaction.

For example,

    var schema = {
      type: 'cars',
      id: 'string',
      attributes: {
        name: {presence: true}
      },
      relationships: {
        wheels: {
          included: true,
          type: 'hasMany'
        }
      }
   }

We need save car and the wheels, but if the wheels fail, car object should not be saved. The server evaluate object as a whole, not as simple parts.

In other words, we need just only one HTTP request for the car and wheels.

Of course, the example is for didactic purposes only.

Regards...

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