[2.0.0] `Cannot read property '_internalModel' of undefined` when saving changeset created off relationship
See original GitHub issueVersion
2.0.0
Test Case
https://ember-twiddle.com/71783e0988666e55502dfdafadc55145
The test case is basically two model instances with a one-to-one relationship. When creating a changeset like new Changeset(this.model.post), save won’t work properly on the changeset.
Steps to reproduce
Click the save button in the twiddle and the error is thrown.
Expected Behavior
Save works properly
Actual Behavior
Somehow the scope is lost when saving the changeset, thus this is undefined. The spot where it’s going wrong is this branch of the save code:
https://github.com/poteto/ember-changeset/blob/d2f9cbe8d6d8f7b774fc51a39d5bdfc7c2df9fc5/addon/index.ts#L227-L235
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
ember.js - Has Many relationship undefined in computed ...
In Ember, whatever you return from the model hook of a route gets set as the model property of the associated controller.
Read more >Bug List - Bugs - Eclipse
IllegalArgumentException: Index out of bounds, 2.0.0, M7 ... WORK, revision.get(CDOFeature) doesn't work if container property is enabled for that feature ...
Read more >@ember-data/debug | Yarn - Package Manager
Release 2.0.0 (August 20, 2015). Breaking Changes. Unsaved deleted records are no longer removed from hasMany relationships and RecordArrays returned by the ...
Read more >Allen SDK Documentation
revision. NWB files released prior to 6/11/2020 are not guaranteed to work with the 2.0.0 version of AllenSDK. If you cannot or choose...
Read more >Oracle Financial Services Basel Regulatory Compliance for US
Getting Started. 1.1. Intended Audience. Welcome to Release 8.1.2.0.0 of the Oracle Financial Services Basel Regulatory Compliance. User Guide.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

v3.6.0!I am not 100% sure, the changeset is definitely working before fully resolving it. I think by adding it in the
savemethod we just add support for passing a relationship and not for records that haven’t been loaded yet.Going to dig a little more this week.