Prasanth Pillai
Prasanth Pillai

Reputation: 166

Doctrine\ORM\ORMException: This behaviour is (currently) not supported by Doctrine 2

I'm running an application stack which uses codeigniter along with doctrine2. I was successfully running the command line tool to generate my models, proxies and db till few days back. Y'day i made some additions to my XML mapping and now if i run

php doctrine-cli.php orm:create

it gives me the following error and exits:

[Doctrine\ORM\ORMException] This behaviour is (currently) not supported by Doctrine 2

How ever, i did

php doctrine-cli.php orm:validate-schema --verbose

Which gave me following message:

[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

Can somebody point me what could be the problem here.

NOTE: my entities and proxies are generated without any problem

EDIT: Closing this as i found the issue and it was nothing but the relation defined in mapping which was creating a problem.

Upvotes: 3

Views: 2833

Answers (1)

Oleksii Zymovets
Oleksii Zymovets

Reputation: 740

This error usually occurs when there is a problem in Entity mappings. For example:

    /**    
    * @OneToMany(targetEntity="Task", mappedBy="")
    */
    private $task

Here above mappedBy property is not specified, which results in this error.

Upvotes: 9

Related Questions