title: Symfony2 How to set option value in choice entity field
body: <p>I'd like to know if there's a way to set the value of an option in a select list. This select is a choice entity field.</p>
  
  <p>Everything is working fine in my code. The point is that in my view I got the ID of each field in the value option and I need to have another field in there.</p>
  
  <p>I'm using the option property to set what will be showed in the option name, but I need to set what will appear in the value field also.</p>
  
  <p>I have no success to found a solution until now, so if anyone could help me out, it will be really appreciated.</p>
  
  <p>A little part of my field in form type.</p>
  
  <pre><code>-&gt;add('fieldName','entity', array(
      'class'    =&gt; 'path\to\entity',
      'property' =&gt; 'name',
      'multiple' =&gt; true,
      'expanded' =&gt; false,
      )
  </code></pre>
  
  <p>Thanks.</p>
  
  <p>My returned HTML code looks like this </p>
  
  <pre><code>&lt;select&gt;
      &lt;option value="4"&gt;ROLE_EXAMPLE&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>What I'm trying to do is get a result like this:</p>
  
  <pre><code>&lt;select&gt;
      &lt;option value="specific_property_from_entity"&gt;ROLE_EXAMPLE&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>