Entity getter returns null

System- symfony 2 with doctrine*

I have an entity that was existing and added a new field manually in the Entity and database.
I added manually setter and getter in the entity.

The setter works as expected and the field is existing in the database, however the getter always returns null.

  • Note: Getter works as expected on local, but does not work on production.

Any idea on what is the reason and how to fix it? I am banging my head right now.

The system is symfony 2 with doctrine.

Field looking like

/**
 * @ORMColumn(name="account_id", type="integer")
 */
public $accountId;

with getter and setter as so:

public function getAccountId()
{
    return $this->accountId;
}

public function setAccountId($accountId)
{
    $this->accountId = $accountId;
}

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *