Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Doctrine2/orm:schema工具:每次更新同一查询时执行_Php_Doctrine Orm - Fatal编程技术网

Php Doctrine2/orm:schema工具:每次更新同一查询时执行

Php Doctrine2/orm:schema工具:每次更新同一查询时执行,php,doctrine-orm,Php,Doctrine Orm,我有一个客户实体,在参考属性/表列上有一个唯一的索引 /** * @ORM\Entity * @ORM\Table(name="clients", uniqueConstraints={@ORM\UniqueConstraint(name="client_reference_idx", columns={"reference"}, options={"where": "(reference IS NOT NULL) AND (reference <> '')"})}) * *

我有一个
客户
实体,在
参考
属性/表列上有一个唯一的索引

/**
 * @ORM\Entity
 * @ORM\Table(name="clients", uniqueConstraints={@ORM\UniqueConstraint(name="client_reference_idx", columns={"reference"}, options={"where": "(reference IS NOT NULL) AND (reference <> '')"})})
 *
 */
class Client
{
    //...
我有其他具有唯一约束的实体,但只有这个实体具有带有
WHERE
子句的约束

怎么了

DROP INDEX client_reference_idx;
CREATE UNIQUE INDEX client_reference_idx ON clients (reference) WHERE (reference IS NOT NULL) AND (reference <> '');