title: Symfony2: Database and Entity settings: Neither property ... nor method ...nor method ... exists in class
body: <p>I have an Symfony2 project cnnected to the database. For each table I have an entity.</p>
  
  <p>Now, I am trying to connect one Entity with another using ManyToOne.</p>
  
  <p>Here is the problem:</p>
  
  <p>I have Two entitys: User and Workplace.</p>
  
  <p>In the User Entity, I have: </p>
  
  <pre><code> /**
   * @ORM\ManyToOne(targetEntity="Workplace")
   * @ORM\JoinColumn(name="workplace", referencedColumnName="place")
   **/
  protected $workplace;
  
  /**
   * Set workplace
   *
   * @param integer $workplace
   */
  public function setWorkplace($workplace)
  {
      $this-&gt;workplace = $workplace;
  }
  
  /**
   * Get workplace
   *
   * @return integer 
   */
  public function getWorkplace()
  {
      return $this-&gt;workplace;
  }
  </code></pre>
  
  <p>In the Workplace Entity I have:</p>
  
  <pre><code>/**
   * @ORM\Column(type="text")
   */
  protected $place;
  
  
  
  /**
   * Set place
   *
   * @param text $place
   */
  public function setPlace($place)
  {
      $this-&gt;place = $place;
  }
  
  /**
   * Get place
   *
   * @return text 
   */
  public function getPlace()
  {
      return $this-&gt;place;
  }
  </code></pre>
  
  <p>And with that, I am getting an exception:</p>
  
  <pre><code>Neither property "workplace" nor method "getWorkplace()" nor method "isWorkplace()" exists in class "SciForum\Version2Bundle\Entity\Workplace" 
  </code></pre>
  
  <p>How could this be resolved. Thank you very much.</p>