Skip to content

POST fails on models with hasMany relationship #212

@dbinetti

Description

@dbinetti

Replicate:

Create two models with parent and children relationship.
Try to POST a new `parent with no children.

Expect: 201
Get: 400 The children field is required.

This can be solved by extending the serializer as described in this thread:
http://discuss.emberjs.com/t/ember-data-1-13-7-using-jsonapi-how-to-post-hasmany-relationships-in-one-payload/8727/7

However, I would expect the adapter to handle this somehow. But maybe it's entirely Ember's fault!

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