Deep Property Mapping

It is possible to map deep properties. An example would be when you have an object with a String property. Your other object has a String property but it is several levels deep within the object graph. In the example below the DestDeepObj has nested attributes within the object graph that need to be mapped. Type hints are supported for deep field mappings. The attributes copy-by-reference, type=one-way, and relationship-type can also be used.

        <!-- java.util.List to java.util.List -->
    <field copy-by-reference="true">

Deep Indexed Mapping

Indexed mapping within deep mapping is supported.


Destination Hints are NOT required if the indexed collection is an Array or if you are using jdk 1.5 Generics. Dozer is able to automatically determine the property type for these use cases. But you will need to provide hints if the data types are not Arrays or if you are not using Generics. This is required so that Dozer knows what types of dest objects to create while it traverses the deep field mapping.

The following is an example of using hints…​..

        com.github.dozermapper.core.vo.TestObject, com.github.dozermapper.core.vo.AnotherTestObject

results matching ""

    No results matching ""