DDC-653: Convert annotation mapping to xml having troubles with discriminator map #805

Closed
opened 2026-01-22 12:51:06 +01:00 by admin · 7 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 24, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user frantisek.troster:

Hi,

I wanted to convert Company model from unit test folder in Doctrine 2
project but I get following error:

doctrine orm:convert-mapping xml /var/www/doctrine-xml/

Entity class 'CompanyPerson' used in the discriminator map of class
'Doctrine\Tests\Models\Company\CompanyPerson' does not exist.

I'm able to convert all other models without any errors and didn't
make any changes to the test models from the current Git version. I
checked the discriminator definitions against documentation and it
seems ok. I have updated Doctrine 2 with all related packages today
form Git. Could you please let me know what am I doing wrong?

Thank you

Originally created by @doctrinebot on GitHub (Jun 24, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user frantisek.troster: Hi, I wanted to convert Company model from unit test folder in Doctrine 2 project but I get following error: > doctrine orm:convert-mapping xml /var/www/doctrine-xml/ Entity class 'CompanyPerson' used in the discriminator map of class 'Doctrine\Tests\Models\Company\CompanyPerson' does not exist. I'm able to convert all other models without any errors and didn't make any changes to the test models from the current Git version. I checked the discriminator definitions against documentation and it seems ok. I have updated Doctrine 2 with all related packages today form Git. Could you please let me know what am I doing wrong? Thank you
admin added the Bug label 2026-01-22 12:51:06 +01:00
admin closed this issue 2026-01-22 12:51:07 +01:00
Author
Owner

@doctrinebot commented on GitHub (Aug 15, 2010):

Comment created by @beberlei:

works for me, can you explain where you get the error described and also paste the stack trace?

@doctrinebot commented on GitHub (Aug 15, 2010): Comment created by @beberlei: works for me, can you explain where you get the error described and also paste the stack trace?
Author
Owner

@doctrinebot commented on GitHub (Aug 30, 2010):

Comment created by romanb:

If we don't get any more feedback and can not reproduce this issue it will be unscheduled from BETA4 since the release is close.

@doctrinebot commented on GitHub (Aug 30, 2010): Comment created by romanb: If we don't get any more feedback and can not reproduce this issue it will be unscheduled from BETA4 since the release is close.
Author
Owner

@doctrinebot commented on GitHub (Aug 30, 2010):

Comment created by frantisek.troster:

Hi,

sorry I was away for a few weeks. Here is the stack trace:

  [Doctrine\ORM\Mapping\MappingException]                                                                                            
  Entity class 'CompanyPerson' used in the discriminator map of class 'Doctrine\Tests\Models\Company\CompanyPerson' does not exist.  

orm:convert-mapping [--filter="..."] [--from-database] [--extend[="..."]] [--num-spaces[="..."]] [-h](--help) [-q](--quiet) [-v](--verbose) [-V](--version) [-c](--color) [-n](--no-interaction) command to-type dest-path


Exception trace:
 () at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/MappingException.php:187
 Doctrine\ORM\Mapping\MappingException::invalidClassInDiscriminatorMap() at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php:1180
 Doctrine\ORM\Mapping\ClassMetadataInfo->setDiscriminatorMap() at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php:187
 Doctrine\ORM\Mapping\Driver\AnnotationDriver->loadMetadataForClass() at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:256
 Doctrine\ORM\Mapping\ClassMetadataFactory->_loadMetadata() at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:155
 Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:102
 Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata() at /var/www/doctrine2/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php:100
 Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand->execute() at /var/www/doctrine2/lib/vendor/Symfony/Components/Console/Command/Command.php:159
 Symfony\Components\Console\Command\Command->run() at /var/www/doctrine2/lib/vendor/Symfony/Components/Console/Application.php:205
 Symfony\Components\Console\Application->doRun() at /var/www/doctrine2/lib/vendor/Symfony/Components/Console/Application.php:117
 Symfony\Components\Console\Application->run() at /var/www/doctrine2/doctrine.php:61

I'm using version:

php doctrine.php -V
Doctrine Command Line Interface version 2.0.0BETA4-DEV

Please let me know if you need more information. Maybe it's just me having wrong configuration.

@doctrinebot commented on GitHub (Aug 30, 2010): Comment created by frantisek.troster: Hi, sorry I was away for a few weeks. Here is the stack trace: ``` [Doctrine\ORM\Mapping\MappingException] Entity class 'CompanyPerson' used in the discriminator map of class 'Doctrine\Tests\Models\Company\CompanyPerson' does not exist. orm:convert-mapping [--filter="..."] [--from-database] [--extend[="..."]] [--num-spaces[="..."]] [-h](--help) [-q](--quiet) [-v](--verbose) [-V](--version) [-c](--color) [-n](--no-interaction) command to-type dest-path Exception trace: () at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/MappingException.php:187 Doctrine\ORM\Mapping\MappingException::invalidClassInDiscriminatorMap() at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php:1180 Doctrine\ORM\Mapping\ClassMetadataInfo->setDiscriminatorMap() at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php:187 Doctrine\ORM\Mapping\Driver\AnnotationDriver->loadMetadataForClass() at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:256 Doctrine\ORM\Mapping\ClassMetadataFactory->_loadMetadata() at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:155 Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() at /var/www/doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:102 Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata() at /var/www/doctrine2/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php:100 Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand->execute() at /var/www/doctrine2/lib/vendor/Symfony/Components/Console/Command/Command.php:159 Symfony\Components\Console\Command\Command->run() at /var/www/doctrine2/lib/vendor/Symfony/Components/Console/Application.php:205 Symfony\Components\Console\Application->doRun() at /var/www/doctrine2/lib/vendor/Symfony/Components/Console/Application.php:117 Symfony\Components\Console\Application->run() at /var/www/doctrine2/doctrine.php:61 ``` I'm using version: ``` php doctrine.php -V Doctrine Command Line Interface version 2.0.0BETA4-DEV ``` Please let me know if you need more information. Maybe it's just me having wrong configuration.
Author
Owner

@doctrinebot commented on GitHub (Aug 31, 2010):

Comment created by @jwage:

Can you provide the entity classes you are getting the errors with?

@doctrinebot commented on GitHub (Aug 31, 2010): Comment created by @jwage: Can you provide the entity classes you are getting the errors with?
Author
Owner

@doctrinebot commented on GitHub (Sep 1, 2010):

Comment created by @beberlei:

Its the Doctrine\Tests\Models\Company model-set in our suite.

@doctrinebot commented on GitHub (Sep 1, 2010): Comment created by @beberlei: Its the Doctrine\Tests\Models\Company model-set in our suite.
Author
Owner

@doctrinebot commented on GitHub (Sep 25, 2010):

Comment created by @beberlei:

Fixed the underlying issue, but this still won't work since mapping conversion is not currently possible with inheritance.

@doctrinebot commented on GitHub (Sep 25, 2010): Comment created by @beberlei: Fixed the underlying issue, but this still won't work since mapping conversion is not currently possible with inheritance.
Author
Owner

@doctrinebot commented on GitHub (Sep 25, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Sep 25, 2010): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#805