Hello,

Dozer looks great to me, but I can't find an good and easy way of mapping an complex datatype to another complex datatype and put this (new/mapped) object into a map with a specified key…

Mapping:
String ->
-> String

I tried this:

<mapping>
        <class-a>OtherBean
        </class-a>
        <class-b>ComplexBean
        </class-b>
        <field custom-converter="CostumConverter">
            <a>test</a>
            <b key="TEST">map</b>
        </field>
    </mapping>

public class ComplexBean {
    // insert a beanOld into
    public Map map = new HashMap();
        //Getter and Setter
}

public class CostumConverter extends DozerConverter<String, BeanOld> {
...
    @Override
    public String convertFrom(BeanOld arg0, String arg1) {
        return arg0.toString();
    }
    @Override
    public BeanOld convertTo(String arg0, BeanOld arg1) {
        arg0 = new String("abc");
        BeanOld b = new BeanOld(arg0, arg0, arg0, arg0, arg0, arg0);
        return b;
    }
}

The other direction is also important.

What do I need and how do I do this?