olosegres/jsona

Infinately nested relationships

johnkorzhuk opened this issue · 1 comments

Not sure if this is an issue or not. An example of what I'm talking about: https://d.pr/v/NEVuzG

The problem here is a shipment has a relationship to loadData and loadData has a relationship to the same shipment causing the output of...

dataFormatter.denormalizeReduxObject({
      reduxObject: state.data,
      entityType: "shipment"
})

...to be what's shown in the link. Is this a concern?

denormalizeReduxObject isn't getting stuck in an infinite loop traversing and building the relationships, so what's going on here? Is it just referencing the same object? Also what implications does this have with react's virtual dom reconciliation? redux-object's build method uses getters for scenarios like this, but it doesn't do as good of a job of building those relationships.

@johnkorzhuk
Hi!
Yes, it's referencing the same object and this is ok, you can get details here #3 (comment)