You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSData gets into infinite loop when trying to add item together with its relations to the store when idAttribute fields of related models are different.
Description
JSData gets into infinite loop when trying to add item together with its relations to the store when
idAttribute
fields of related models are different.Environment
Steps to reproduce
simple code to reproduce
Same code on RunKit: https://runkit.com/embed/frx2z0xbtijo
Possible Fix
As far as I see, there is an error on following line:
js-data/src/Relation.js
Line 163 in c068c4b
Here
this.mapper
is not a mapper ofrelatedRecord
, so taking it'sidAttribute
is not right.Most likely, this line should be replaced with
I will follow-up with a fix PR together with appropriate tests in upcoming days.
The text was updated successfully, but these errors were encountered: