Bug #41727

@Flow\Identity and @ORM\InheritanceType("JOINED") can't be used together

Added by Irene Höppner about 8 years ago. Updated almost 8 years ago.

Status:
Accepted
Priority:
Should have
Category:
-
Target version:
-
Start date:
2012-10-08
Due date:
% Done:

0%

PHP Version:
Has patch:
No
Complexity:

Description

If you have a superclass

/**
 * @Flow\Entity
 * @ORM\InheritanceType("JOINED")
 */
class Person {
    /**
     * @var string
     * @Flow\Identity
     */
    protected $email;

[getters and setters...]

}

and a corresponding subclass

/**
 * @Flow\Entity
 */
class SpecialPerson extends \In2code\IdentityMigrationTest\Domain\Model\Person {

}

the doctrine:migrationgenerate and doctrine:update commands fail with the following exception:

Uncaught Exception
  There is no column with name 'email' on table
  'in2code_identitymigrationtest_domain_model_specialperson'.

More Information
  Exception code      #30
  File                /Users/ihoeppner/Sites/Base/Packages/Vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaException.php line 60

Also some functional tests fail with "Doctrine\DBAL\Schema\SchemaException : There is no column with name 'email' on table 'in2code_identitymigrationtest_domain_model_specialperson'.".

Removing either the @ORM\InheritanceType annotation or the @Flow\Identity annotation "resolves" the problem.

This regards to version 1.1.0 and 1.2.0-dev.

History

#1 Updated by Karsten Dambekalns almost 8 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns

Also available in: Atom PDF