Closed feludens closed 5 years ago
Hello @feludens , registering two different classes with the same type is not supported. Registering one will invalidate the other which means that than when the other one is used you end up with the error described.
Thanks for confirming it!
Hi Jasmine, I am running into an issue and I am not sure why this is happening ONLY to this class. I am in a super time crunch after a backend change has been made where they changed the
type
attribute's name. I went ahead and updated the name frombuildings
todeliveryBuildings
, since then, I have been getting UnregisteredTypeException. Do you know why that is happening?And here's the payload:
As I mentioned, when the type was buildings, it worked. Here's how I am trying to deserialize it:
All other classed are deserialized as expected.
Any idea on why this is happening?
Thanks for the help!
EDIT: Are models being cached somehow?
EDIT 2: New findings If I call this directly:
new ResourceConverter(BuildingDTO.class).readDocumentCollection(response.getBody(), resourceClass)
Then it works. BuildingDTO, as you can see below, is included in my Resource Converter. ---- I THINK, I might know what's happening... Both BuildingDTO and DeliveryBuildingDTO have the same name type "deliveryBuilding" but they are actually two different object types.Do you think having two different classes with the same type in a converter, could be causing this issue?