Task #27283

Handle @InheritanceType in a correct manner

Added by Rens Admiraal over 10 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Start date:
2011-06-07
Due date:
% Done:

100%

Estimated time:
Sprint:
PHP Version:
Has patch:
No
Complexity:

Description

If a model is extended the base class needs to be annotated with InheritanceType. Problem is that we don't know which classes will ever be extended, and Doctrine throws an error when the InheritanceType is set without discriminator map:

Uncaught Exception in FLOW3 Entity class 'F3\FLOW3\Security\Account' is using inheritance but no discriminator map was defined. thrown in file .../ORM/Mapping/MappingException.php in line 202

In such cases the annotation must be ignored by our annotation driver, or the IneritanceType should be set automagically if FLOW3 detects that a model is extended.

Relates to: https://review.typo3.org/#change,2130


Related issues

Related to TYPO3.Flow - Feature #37372: Inheritance in ORM should be configured automaticallyAcceptedKarsten Dambekalns2012-05-21

Actions

Also available in: Atom PDF