title: Concatenate properties in Symfony2 buildForm()
body: <p>I have a set of entities in Doctrine which depends on each other to build certain data, and I need to create a form which uses data from two of those entities.</p>
  
  <p>I have a Magazine entity, an Issue entity and a Chapter entity. The Magazine (Mag1, Mag2) has it's name, the Issue, that belongs to only one Magazine, has it's 'number' (Mag1->Issue 1, Mag1->Issue 2, Mag3-> Issue 1, Mag2 -> Issue 'Summer'). The Chapter have to belong to just one Issue, but when creating the form, to build the Issue selector I need to concatenate properties from two entities:</p>
  
  <pre><code>class ChapterType extends AbstractType
  {
  public function buildForm(FormBuilderInterface $builder, array $options)
  {
      $builder
          -&gt;add('name')
          -&gt;add('number')
          -&gt;add('issue', 'entity', array(
                  'class' =&gt; 'Bundle:Issue',
                  'property' =&gt; 'magazine.name'
          ))
      ;
  }
  ...
  </code></pre>
  
  <p>What I need to do is concatenate in the 'property' something like <code>'magazine.name'+'number'</code> (where <code>'number'</code> is the Issue which will be added number. Trying to concatenate with the <code>.</code> like in php strings doesn't work since they aren't strings so I don't know what I have to do or if It's possible to do It this way.</p>