title: Catchable Fatal Error: Object of class Proxies\__CG__\AppBundle\Entity\Ticket could not be converted to string
body: <p>I have an issue on my project using Symfony2. Is a 'worklog' project, with tickets(issues) for a specific project. But when I try to edit a worklog entry I have this error :</p>
  
  <blockquote>
    <p>Catchable Fatal Error: Object of class
    Proxies__CG__\AppBundle\Entity\Ticket could not be converted to
    string</p>
  </blockquote>
  
  <p>This is my db model :
  <a href="https://i.stack.imgur.com/rmd4Z.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rmd4Z.png" alt="enter image description here"></a></p>
  
  <p>And this is a part of the code from AppBundle/Entity/Worklog/</p>
  
  <pre><code>/**
   * @var \Ticket
   *
   * @ORM\ManyToOne(targetEntity="Ticket")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="ticket_ticket_id", referencedColumnName="ticket_id")
   * })
   */
  private $ticketTicket;
  </code></pre>
  
  <p>And from AppBundle/Entity/Ticket/</p>
  
  <pre><code>/**
   * @var integer
   *
   * @ORM\Column(name="ticket_id", type="integer", nullable=false)
   * @ORM\Id
   * @ORM\GeneratedValue(strategy="IDENTITY")
   */
  private $ticketId;
  </code></pre>
  
  <p>Do you have any idea why I have this errors ? Any idea to help ?</p>
  
  <p>Worklog Form:</p>
  
  <pre><code>/**
   * @param FormBuilderInterface $builder
   * @param array $options
   */
  public function buildForm(FormBuilderInterface $builder, array $options)
  {
      $builder
          -&gt;add('worklogDate')
          -&gt;add('worklogDuration')
          -&gt;add('worklogDescription')
          -&gt;add('ticketTicket')
      ;
  }
  
  /**
   * @param OptionsResolverInterface $resolver
   */
  public function setDefaultOptions(OptionsResolverInterface $resolver)
  {
      $resolver-&gt;setDefaults(array(
          'data_class' =&gt; 'AppBundle\Entity\Worklog'
      ));
  }
  
  /**
   * @return string
   */
  public function getName()
  {
      return 'appbundle_worklog';
  }
  </code></pre>