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

Edit identity (primary key) field #332

Closed
vasiakorobkin opened this issue Feb 26, 2015 · 2 comments · Fixed by #334
Closed

Edit identity (primary key) field #332

vasiakorobkin opened this issue Feb 26, 2015 · 2 comments · Fixed by #334

Comments

@vasiakorobkin
Copy link

Given:

  • a product entity element with name custom primary key, which set as entity identifier using entity method .identifier()
  • Let name value to be "abc", so we can edit this element by sending PUT request to _/product/abc_ URL

Problem:
When I try to edit name custom primary key setting it to, for example, "def", ng-admin sends modified entity element via PUT request to _/product/def_ URL. But no corresponding entity element does exist on this URL at the moment, so back-end fails to save changes.

Suggested solution:
To make ng-admin send PUT request to _/product/abc_ URL, using the original name value "abc" even if it was modified to "def". I think this should be default behavior.

@fzaninotto
Copy link
Member

Good point, that will need to be addressed some time in the future. Until we face the problem ourselves, would you like to work on a patch?

@vasiakorobkin
Copy link
Author

Well, that wasn't a part of my plans... But I'll try to spare some of my time on it.

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

Successfully merging a pull request may close this issue.

2 participants