Php 条令\ORM\orException:条令2(当前)不支持此行为
我正在运行一个应用程序堆栈,它使用codeigniter和doctrine2。几天前,我成功地运行了命令行工具来生成模型、代理和数据库。那天我对XML映射做了一些补充,现在如果我运行Php 条令\ORM\orException:条令2(当前)不支持此行为,php,doctrine-orm,Php,Doctrine Orm,我正在运行一个应用程序堆栈,它使用codeigniter和doctrine2。几天前,我成功地运行了命令行工具来生成模型、代理和数据库。那天我对XML映射做了一些补充,现在如果我运行 php doctrine-cli.php orm:create 它给出了以下错误和退出: [Doctrine\ORM\ORMException] This behaviour is (currently) not supported by Doctrine 2 然而,我做到了 php doctrine-cli.
php doctrine-cli.php orm:create
它给出了以下错误和退出:
[Doctrine\ORM\ORMException] This behaviour is (currently) not supported by Doctrine 2
然而,我做到了
php doctrine-cli.php orm:validate-schema --verbose
这给了我以下信息:
[Mapping] OK - The mapping files are correct.
[Doctrine\ORM\ORMException]
This behaviour is (currently) not supported by Doctrine 2
Exception trace:
() at C:\wamp\www\frsale\application\libraries\Doctrine\ORM\ORMException.php:12
8
Doctrine\ORM\ORMException::notSupported() at C:\wamp\www\frsale\application\lib
raries\Doctrine\ORM\Tools\SchemaTool.php:439
Doctrine\ORM\Tools\SchemaTool->_gatherRelationsSql() at C:\wamp\www\frsale\appl
ication\libraries\Doctrine\ORM\Tools\SchemaTool.php:213
Doctrine\ORM\Tools\SchemaTool->getSchemaFromMetadata() at C:\wamp\www\frsale\ap
plication\libraries\Doctrine\ORM\Tools\SchemaTool.php:711
Doctrine\ORM\Tools\SchemaTool->getUpdateSchemaSql() at C:\wamp\www\frsale\appli
cation\libraries\Doctrine\ORM\Tools\SchemaValidator.php:287
Doctrine\ORM\Tools\SchemaValidator->schemaInSyncWithMetadata() at C:\wamp\www\f
rsale\application\libraries\Doctrine\ORM\Tools\Console\Command\ValidateSchemaCom
mand.php:77
Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand->execute() at C:\wamp\
www\frsale\application\libraries\Doctrine\Symfony\Component\Console\Command\Comm
and.php:239
Symfony\Component\Console\Command\Command->run() at C:\wamp\www\frsale\applicat
ion\libraries\Doctrine\Symfony\Component\Console\Application.php:193
Symfony\Component\Console\Application->doRun() at C:\wamp\www\frsale\applicatio
n\libraries\Doctrine\Symfony\Component\Console\Application.php:106
Symfony\Component\Console\Application->run() at C:\wamp\www\frsale\application\
doctrine-cli.php:42
orm:validate-schema
有人能告诉我这里有什么问题吗 注意:我的实体和代理生成时没有任何问题
编辑:当我发现问题时关闭此对话框,它只不过是映射中定义的关系造成了问题 当实体映射出现问题时,通常会发生此错误。例如:
/**
* @OneToMany(targetEntity="Task", mappedBy="")
*/
private $task
此处未指定上面的mappedBy属性,这将导致此错误