Task #27283

Handle @InheritanceType in a correct manner

Added by Rens Admiraal about 10 years ago. Updated over 8 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
#1

Updated by Rens Admiraal about 10 years ago

  • Category set to Persistence
#2

Updated by Karsten Dambekalns about 9 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
  • Target version set to 1.1
  • Has patch set to No
#3

Updated by Karsten Dambekalns about 9 years ago

This works for non-abstract base classes since the merge of https://review.typo3.org/2277 (as the discriminator map is always defined).

#4

Updated by Gerrit Code Review about 9 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10893

#5

Updated by Gerrit Code Review about 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10893

#6

Updated by Karsten Dambekalns about 9 years ago

  • Target version changed from 1.1 to 1.1 beta 2
#7

Updated by Karsten Dambekalns about 9 years ago

  • Target version changed from 1.1 beta 2 to 2.0 beta 1
#8

Updated by Gerrit Code Review about 9 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10893

#9

Updated by Gerrit Code Review over 8 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10893

#10

Updated by Gerrit Code Review over 8 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10893

#11

Updated by Karsten Dambekalns over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF