Environment: Spring 2.0
IN Dozer 2.2, my mappings were defined specifying interfaces. Everything worked well.
Upgrading to 2.4, and this happens in 2.3 as well, causes mappings to break when a field has a map-id defined and the class mappings within that map are specified as interfaces.
In 2.2, the MappingProcessor would try to determine the ClassMap based upon map-id, if one was provided.
MappingProcessor: line 1214: determineClassMap(Object sourceObj, Class destClass, String mapId, boolean isInstance)
But in 2.4, the determineClassMap method was replaced with getClassMap, which utilizes the ClassMapFinder class. This class performs a lookup based upon a generated key rather than relying upon only the map-id.
When executing my app, the keys that resided within the customerMappings were as follows:
[com.sybase.it.rosettanet.pip3A4.purchaseorder.ShipTocom.sybase.it.cosmos.domain.ShipToShipTo, com.sybase.it.rosettanet.pip3A4.purchaseorder.PhysicalAddress01com.sybase.it.cosmos.domain.PhysicalLocationPhysicalAddress, com.sybase.it.cosmos.domain.PhysicalLocationcom.sybase.it.rosettanet.pip3A4.purchaseorder.PhysicalAddress01PhysicalAddress, com.sybase.it.cosmos.domain.ShipTocom.sybase.it.rosettanet.pip3A4.purchaseorder.ShipToShipTo, com.sybase.it.rosettanet.pip3A4.purchaseorder.Pip3A4PurchaseOrderRequestcom.sybase.it.cosmos.domain.ShipToCBSS, com.sybase.it.cosmos.domain.ShipTocom.sybase.it.rosettanet.pip3A4.purchaseorder.Pip3A4PurchaseOrderRequestCBSS]
But the generated key was as follows:
The newly generated key utilizes the passed in source class and destination class to generate a key. The problem is that my mappings for my source object are based upon interfaces rather than on implementations, so the lookup fails. The lookup would have succeeded had the key been as follows:
Log in to post a comment.