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 record from an association directly. #115
Conversation
Shouldn't it be called |
It is possible / desirable to have it also update the other end on a bi-directional relationship? I've noticed this seems to be lacking in ember right now. eg.
|
@juggy @wyaeld we are currently working on making bidirectional relationships work. In fact, the code to make it work is @juggy it seems like new records should be in the same transaction as their parent record. Can you update this code to ensure that? |
+1 on this pull.. would save a lot of grief for me |
Hey @juggy, would you mind making this rebase cleanly so we can merge it in? Thanks amigo. |
Conflicts: packages/ember-data/lib/system/model_array/many_array.js packages/ember-data/tests/unit/associations_test.js
Use #230 |
Hello,
I spoke about this with @wycats this morning. With this pull request you can directly create a new record directly on the association. So instead of:
You can do:
It will use the parentRecord store to create the record.
This somewhat reflects Rails functionality in regards to relations and gives a clear direction to the user as to how to use them.
Thanks,
Julien.