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
Now the normalized issue will have the same ID and get merged in cache, but the contact will get a different generated ID so the issue will point to a new contact ID which only has the phone attribute. The first query will re-run and find that the contact object is missing name and re-fetch and overwrite issue.contact with an object which only have name. Now the second query will re-run and find that issue.contact is missing name and we have an infinite loop.
The text was updated successfully, but these errors were encountered:
Since the value object is logically part of the closest entity, perhaps an alternative way to solve it would be to automatically generate ID for the value object starting from the parent ID. I think today the automatically generated path is the full path in the query which will generate different IDs depending on where in the query the parent entity exists.
Entities have ID while value objects does not. If an entity has a value object it still gets normalized with a generated ID.
For example
Here we get a list of issues, where each issue have an ID. Each issue have a contact object which does not have an ID (it is part of the issue).
Now somewhere else we get a single issue and only the phone of the contact:
Now the normalized issue will have the same ID and get merged in cache, but the contact will get a different generated ID so the issue will point to a new contact ID which only has the phone attribute. The first query will re-run and find that the contact object is missing name and re-fetch and overwrite issue.contact with an object which only have name. Now the second query will re-run and find that issue.contact is missing name and we have an infinite loop.
The text was updated successfully, but these errors were encountered: