Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create/Update FK bad behavior #356

Open
threewordphrase opened this issue Aug 11, 2023 · 0 comments
Open

Create/Update FK bad behavior #356

threewordphrase opened this issue Aug 11, 2023 · 0 comments

Comments

@threewordphrase
Copy link

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?

@threewordphrase threewordphrase changed the title Update relationship bad behavior Create/Update FK bad behavior Aug 11, 2023
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

No branches or pull requests

1 participant