This question is not relating with AutoMapper. My question is about ModelMapper in java, however I cannot create new tag for modelmapper as my little reputation. Sorry for confusion.
Anyway, my question is that does modelmapper library support collections like arraylist or hashset? it seems not support collection to collection mapping. Is it true?
You can also map collections () directly:
List<Person> persons = getPersons();
// Define the target type
java.lang.reflect.Type targetListType = new TypeToken<List<PersonDTO>>() {}.getType();
List<PersonDTO> personDTOs = mapper.map(persons, targetListType);