-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Id is abscent in payload on saving a new model #3360
Comments
You don't have to pass: |
Hi @novtor, that does not seem like expected behavior. Would you be able to make a jsbin demonstrating the issue? Here is a jsbin to get you started http://emberjs.jsbin.com/navucuvoso/1/edit?html,js |
Hi @btecu, @bmac. Thank you for your replies. In my usecase I need to precise the id of the record being saved. |
@novtor for creating a model with a primaryKey, I think you must pass the id in the |
Hi @sly7-7 thank you for your reply. So it looks to be expected. |
Hmm, so if it used to work pre beta.19, that should mean it is maybe something we forgot when introducing internalModels. |
+1, I am currently experiencing this issue as well, starting with ED 1.0.0-beta.19. ids were mutable in 1.0.0-beta.18 and previous, but not with 1.0.0-beta.19 and newer. |
@sly7-7 It would seem to me that having the id be immutable after the record is committed would be appropriate, but before committing I think we should be able to change it. |
@wecc Do you have any thoughts on this ? |
No, need to poke @igorT brain to understand Modal/InternalModel better. |
I can confirm this issue too. Imo the id should be immutable after saving (POST) for the first time. But right after createRecord it still should be callable. |
Closing as I'm pretty sure this have been fixed by #3701, please re-open if I'm mistaken. |
When I create a model
the id 'qwerty' is abscent in the server call.
Is it expected behavior?
The text was updated successfully, but these errors were encountered: