title: Modelmapper with Collection and JPA
body: <p>I read about ModelMapper, today and it seems to be very interesting, but I'm not sure about the right usage.</p>
  
  <p>I have a Spring-Project like this:
  I have my model classes which are necessary for serialization. My REST controller return DTO-objects to the front end. And my frontend returns DTOs to my controller and then I need my model objects from the DTOs to write it to the database.</p>
  
  <p>I have a person class that has an attribute like: <code>Set&lt;Company&gt; companies = new HashSet&lt;Company&gt;();</code></p>
  
  <p>I want the modelmapper to map this set to an attribute: <code>Set&lt;String&gt; companies = new HashSet&lt;String&gt;()</code>.The 2nd set shall be filled by calling companies.getName() instead of filling the Set with the whole object.</p>
  
  <p>My questions:</p>
  
  <ol>
  <li>Do I need a PropertyMap or a converter?</li>
  <li>How exactly can I do this?</li>
  <li>Is it possible to say Convert from <code>Set&lt;Companies&gt;</code> into a single String. Like I want just one company?</li>
  </ol>
  
  <p>Sorry, I'm very new to ModelMapper and I'm searching for the best way to map during <strong>serialization and deserialization</strong> in combinatino with spring.</p>