Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.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
Symfony1 在任务中设置条令属性_Symfony1_Doctrine_Symfony 1.4 - Fatal编程技术网

Symfony1 在任务中设置条令属性

Symfony1 在任务中设置条令属性,symfony1,doctrine,symfony-1.4,Symfony1,Doctrine,Symfony 1.4,我试图在任务中设置一个条令属性,但它似乎不起作用 我试图设置的是一个禁用条令验证的属性: $databaseManager = new sfDatabaseManager($this->configuration); $connection = $databaseManager->getDatabase('doctrine')->getConnection(); $connection->setAttribute(Doctrine_Core::ATTR_VALIDATE,

我试图在任务中设置一个条令属性,但它似乎不起作用

我试图设置的是一个禁用条令验证的属性:

$databaseManager = new sfDatabaseManager($this->configuration);
$connection = $databaseManager->getDatabase('doctrine')->getConnection();
$connection->setAttribute(Doctrine_Core::ATTR_VALIDATE, Doctrine_Core::VALIDATE_NONE);
但它不起作用,因为我正在创建一个新记录,其值由于minlength规则而无法验证,并且它显示了一个验证错误


我做错了什么?

试着在经理身上设置:

$databaseManager->setAttribute(Doctrine_Core::ATTR_VALIDATE, Doctrine_Core::VALIDATE_NONE)

尝试在管理器上设置它:

$databaseManager->setAttribute(Doctrine_Core::ATTR_VALIDATE, Doctrine_Core::VALIDATE_NONE)

你能粘贴你的错误信息吗?哪个版本的条令?还是西蒙尼?我对1.4.11有问题,你能粘贴你的错误消息吗?哪个版本的条令?还是西蒙尼?我对1.4.11有问题