Skip to content

Create/Update FK bad behavior #356

@threewordphrase

Description

@threewordphrase

I've been using this package for along time. I love it forlist and get endpoints. However I am extremely disappointed with the create/update behavior to the point where I am considering abandoning it.

When I create or update a record, for example updating a Store object that has a relationship to a Manager, I need to POST/PATCH this:

{"manager": 1}

Instead of this:

{"manager_id": 1}

The response from the update/create is also incorrect. It returns an object containing 'manager_id': 3, 'manager': 3. I did not pass any include params (the manager field is deferred) so I would expect to only get the manager_id field. And if I do get the manager field, I certainly do not want it to be the FK. That's the manager_id field.

How can I make this consistent?

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