Hello,
I'm currently having a serious issue using the class level properties to java.util.Map mapping, as described here:
http://dozer.sourceforge.net/documentation/mapbackedproperty.html#Mapping%20Class%20Level%20Properties%20to%20a%20java.util.Map%20or%20a%20Custom%20Map%20with%20unique%20Get/Set%20methods
When you have a java.lang.String , the "class level properties" are perfectly mapped into a java.util.Map
But if these class level properties are in fact some more complicated default objects, like a Set<String>, it does not work anymore.
In the attached two examples, first one is as follow:
1/
TestSetTO contains 3 String fields (set1, set2, set3)
TestMapTO contains 1 Map<String, String> field (map)
in the dozer xml config, I defined 1 "map" mapping (id=setToMap1) which maps each particular field of the TestSetTO to a java.util.Map with a specific key.
Resulting mapped TestMapTO object has its "map" field populate with the three pairs (key=>value), as defined in the mapping.
2/
TestSetTO contains 3 Set<String> fields (set1, set2, set3)
TestMapTO contains 1 Map<String, Set<String>> field (map)
in the dozer xml config, I defined 1 "map" mapping (id=setToMap2) which maps each particular field of the TestSetTO to a java.util.Map with a specific key (indeed, same kind of mapping as for the first case)
Resulting mapped TestMapTO object has its "map" field empty. WRONG!!!
I included the *.log for both cases, setting log4j.logger.net.sf.dozer.util.mapping.MappingProcessor=DEBUG )
Notice that I use Dozer 4.2 in a Java 5.0 environment (using Eclipse Europa 3.3.1.1)
2 test cases (1 working, 1 not)