Php 条令鉴别器列更新

Php 条令鉴别器列更新,php,doctrine-orm,symfony,query-cache,Php,Doctrine Orm,Symfony,Query Cache,我在更新列名称时遇到问题 实体: /** *@ORM\Entity *@ORM\Table(name="item") *@ORM\InheritanceType("JOINED") *@ORM\DiscriminatorColumn(name="item_type", type="string") */ abstract class Item { } /** *@ORM\Entity *@ORM\Table(name="product") *@ORM\Inheritance

我在更新列名称时遇到问题

实体:

/**
 *@ORM\Entity
 *@ORM\Table(name="item")
 *@ORM\InheritanceType("JOINED")
 *@ORM\DiscriminatorColumn(name="item_type", type="string")
 */
abstract class Item
{

}


/**
 *@ORM\Entity
 *@ORM\Table(name="product")
 *@ORM\InheritanceType("JOINED")
 */
abstract class Product extends Item
{

}

/**
 *@ORM\Entity
 *@ORM\Table(name="vehicle")
 *@ORM\InheritanceType("JOINED")
 */
abstract class Vehicle extends ItemBundle\Product
{

}


/**
 *@ORM\Entity(repositoryClass="Aussiito\Bundles\VehicleBundle\Entity\Repository\CarRepository")
 *@ORM\Table(name="car")
 */
class Car extends Vehicle
{
}


class CarRepository extends EntityRepository
{

    public function getListCars(){
        return $this->findAll();

    }
}
在此之前,我没有在“item”上添加注释:@ORM\DiscriminatorColumn(name=“item\u type”,type=“string”),因此默认情况下,我有一个列dType。我想按“item_type”重命名字段,因此添加了注释并执行以下命令:

php bin/console doctrine:schema:update
已成功执行对数据库的修改,但在调用函数getListCars()时,出现以下错误:

执行“选择t3.id作为id_4,t3.created_作为创建_作为创建_在_5,t3.Update_作为更新_在_6,t2.id作为id_7,t1.id作为id_8,t0.id作为id_9,t3.dtype FROM car t0 internal JOIN vehicle t1 ON t0.id=t1.id内部连接产品t2 ON t0.id=t2.id内部连接项目t3 ON t0.id=t3.id”:

SQLSTATE[42S22]:未找到列:“字段列表”中的1054未知列“t3.dtype”

所以我认为这是缓存,我执行了以下命令:

php bin/console cache:clear --env=prod
php bin/console cache:clear --env=dev
php bin/console doctrine:cache:clear-query  
php bin/console doctrine:cache:clear-result  
php bin/console doctrine:cache:clear-metadata 
但我也有同样的错误

有人有解决办法吗