adopted-ember-addons / adopted-ember-addons/ember-changeset

Improved Ember Data and Ember Changeset support for relationships

未關閉
#599 11 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
JavaScript
星號
425
分支
136
PR 合併指標
30 天內沒有已合併 PR

描述

### Main problem
Create a changeset with a `model`, set a belongsTo relationship, change a belongsTo, and lastly revert back to original - the changeset will be dirty

Support for ember-data relationship objects has been fraught with issues. Precisely and often with async (default) relationships in Ember Data. This is due to them being behind a Proxy, thus a `===` will fail with the same relationship.

This issue is to track (and keep me honest) in either implementing better support for ember data relationships or improved documentation.

One idea that is floating around is to use @embroider/macros to see if e-d is installed and then we can `importSync` the model and do an `instanceof Model` check. I'll be exploring this space in the next few weeks.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。