changset.get on a belongsTo relationship returns a proxy
See original GitHub issueRelates to #543
@snewcomer thank you for getting that fix merged in so quickly for the mergeDeep issue on a hasMany! 💪
In testing out the v3.9.2 we realized we are still experiencing this issue in belongsTo relationships as well.
I have to take a break from the keyboard for a bit, but here’s another breaking test to give you an idea of how it is occurring.
https://github.com/jaredgalanis/ember-changeset/commit/470a1558786a1a5df707926a5d4fd9f5b571dde9
I’m happy to take a swing at fixing it later, but given your understanding of the internals it may just be more efficient if you know where the fix is to let you handle it?
Thanks again for addressing this so quickly! 😃
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Ember data BelongsTo relationships returns a proxy but it ...
Ember data BelongsTo relationships returns a proxy but it returns a different proxy even when all items belong to the same parent.
Read more >Ember Data Proxy BelongsTo
I have 2 models. The parent has a hasMany relationship with the children. Each child has a belongsTo relationship with its parent.
Read more >creates a manifest for an uploaded file group, and puts it in s3
List Relationships with the given relationship id · Returns the Relationship Instance that was created · Get a Relationship · Update a Relationship...
Read more >Web service error codes (Microsoft Dataverse) - Power Apps
This topic lists the error codes you might encounter when you debug your code.
Read more >RFC 3588: Diameter Base Protocol
In order to improve scalability, [PROXYCHAIN] introduced the concept of proxy ... Every Diameter accounting application specification MUST have an IANA ...
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

We could do workarounds like
unwrapor accessingcontentdirectly, but I think this is quite a change from ember-changeset previously and not an intuitive experience. It’s easy to miss one, and it would be ideal if we could restore the old behavior, so it can be used just like a normal model in forms.Yep that makes sense. I haven’t documented it well, but we have tons of tradeoffs since 2.0. Accessing nested data has never worked well. This recursive proxy solution fixes this as long as you access the leaf keys.
https://github.com/validated-changeset/validated-changeset/pull/45
In your case, do you have access to the belongsTo record before it gets passed to e-p-s? If so, can you try calling
belongsTo.unwrap()where this property is read?https://github.com/validated-changeset/validated-changeset/blob/70e918a80fc1149a09e1f922afb5de710a7ce3ad/src/index.ts#L979