Bug report
Sandbox link or minimal reproduction code
Sandbox example
Describe the expected behavior
I have a Base model that is composed in two places one, two in the store tree. This model uses nested models Country and City. I add a new country and a new city in both places with the same identifiers. The cities are also placed in an array of references at the country model. Now I want to get the cities of a country by reading the list of cities references.
Describe the observed behavior
When trying to get the list of cities from references list of Country model, the following error throws:
[mobx-state-tree] Cannot resolve a reference to type 'late(function () {
return City;
})' with id: '1000' unambigously, there are multiple candidates: /one/cities/1000, /two/cities/1000
The same is NOT happening when trying to get a country, even though there are multiple countries with the same identifier, but not in a list of references.
It seams that resolving an item by its reference identifier not working if there are multiple items with the same identifier.
Bug report
Sandbox link or minimal reproduction code
Sandbox example
Describe the expected behavior
I have a
Basemodel that is composed in two placesone, twoin the store tree. This model uses nested modelsCountryandCity. I add a new country and a new city in both places with the same identifiers. The cities are also placed in an array of references at the country model. Now I want to get the cities of a country by reading the list of cities references.Describe the observed behavior
When trying to get the list of cities from references list of
Countrymodel, the following error throws:The same is NOT happening when trying to get a country, even though there are multiple countries with the same identifier, but not in a list of references.
It seams that resolving an item by its reference identifier not working if there are multiple items with the same identifier.