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

add support for server-generated ids #211

Open
remmeier opened this issue Jul 12, 2017 · 3 comments
Open

add support for server-generated ids #211

remmeier opened this issue Jul 12, 2017 · 3 comments

Comments

@remmeier
Copy link
Collaborator

a temporary ID is needed for ngrx-json-api till the POST completes. Adding a new flag "hasTemporaryId" to remove the ID from the POST request again. After that it is up to the application to switch from the temporary to the permanent id.

remmeier added a commit that referenced this issue Jul 12, 2017
introduced hasTemporaryId flag to mark a resource as having a temporary ID till the point a permanent one is assigned by a POST request.
remmeier added a commit that referenced this issue Jul 12, 2017
introduced hasTemporaryId flag to mark a resource as having a temporary ID till the point a permanent one is assigned by a POST request.
@mrconnerton
Copy link

This allows for a server generated id, however when the post responses successful, the temp id needs to be updated.

@mrconnerton
Copy link

"After that it is up to the application to switch from the temporary to the permanent id." > how do I listen for / update the store?

@abdulhaq-e
Copy link
Owner

I think what @remmeier means is that the server will generate an id and that will be returned in a successful POST request. This server generated id will be used to index the StoreResource and the StoreResource indexed by temporaryId will be removed.

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

3 participants