Ошибка при наследовании модели OroCRM

Приветствую!

Давеча словил ошибку с которой провозился очень много времени. Возникла она при попытке расширить Entity другого бандла.

An exception occurred while executing ‘SELECT t1.id AS id2, t1.name AS name3, t1.status AS status4, t1.customeridentity AS customeridentity5, t1.channeltype AS channeltype6, t1.data AS data7, t1.createdAt AS createdat8, t1.updatedAt AS updatedat9, t1.template AS template10, t1.organizationownerid AS organizationownerid11, t1.datasourceid AS datasourceid12 FROM orocrmchannel t1 WHERE t0.id = ?’ with params [«1»]: SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table «t0»
LINE 1: … AS data
sourceid12 FROM orocrmchannel t1 WHERE t0.id = ‘1…

Суть как видите в не определенном t0, лечится это так:

  1. Заходим в ваш Entity

  2. Переопределяем ID этим же ID (см. @ORM\AttributeOverrides):

<?php  
namespace Hinex\Bundle\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;  
use OroCRM\Bundle\ChannelBundle\Entity\Channel as BaseChannel;  
use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;

/**
 * @ORM\Entity
 * @ORM\AttributeOverrides({
 *     @ORM\AttributeOverride(name="id",
 *          column=@ORM\Column(
 *              name     = "id",
 *              type     = "integer"
 *          )
 *      )
 * })
*/

class Channel extends BaseChannel  
{
     ...
}

И все готово!