Bug #41727

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

Added by Irene Höppner almost 3 years ago. Updated over 2 years ago.

Status:Accepted Start date:2012-10-08
Priority:Should have Due date:
Assigned To:Karsten Dambekalns % Done:

0%

Category:-
Target version:-
PHP Version: Complexity:
Has patch:No Affected Flow version:(any)

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 over 2 years ago

  • Status changed from New to Accepted
  • Assigned To set to Karsten Dambekalns

Also available in: Atom PDF