I am using Doctrine 2.3.3 as ORM in my project. Everything is running smooth and fine. Now i want to give my column names my own aliases. I've read in the documentation of doctrine 2 that the following code is the way to give aliases.
<?php
/**
* @Entity(repositoryClass="Entity\Repositories\EmployeeRepository")
* @Entity @Table(name="tbl_employee")
*/
class TblEmployee
{
/** @Id @Column(name="employee_id",type="string",length=45) */
public $emid;
//getters
public function getEmId()
{
return $this->emid;
}
//setters
public function setEmployeeId($emid)
{
$this->emid = $emid;
}
?>
but when i execute this code I get the error
[Semantical Error] line 0, col 36 near 'employee_id <': Error: Class TblEmployee has no field or association named employee_id
how do i solve this?? or what is the correct way to give aliases to the columns??