Task #27283

Handle @InheritanceType in a correct manner

Added by Rens Admiraal almost 2 years ago. Updated 5 months ago.

Status:Resolved Start date:2011-06-07
Priority:Should have Due date:
Assignee:Karsten Dambekalns % Done:

100%

Category:Persistence
Target version:TYPO3 Flow Base Distribution - 2.0 beta 1
Sprint: Has patch:No
PHP Version: Complexity:
Votes: 1 (View)

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 automatically Accepted 2012-05-21

History

Updated by Rens Admiraal almost 2 years ago

  • Category set to Persistence

Updated by Karsten Dambekalns about 1 year ago

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

Updated by Karsten Dambekalns about 1 year ago

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

Updated by Gerrit Code Review about 1 year 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

Updated by Gerrit Code Review about 1 year ago

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

Updated by Karsten Dambekalns about 1 year ago

  • Target version changed from 1.1 to 1.1 beta 2

Updated by Karsten Dambekalns 12 months ago

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

Updated by Gerrit Code Review 12 months ago

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

Updated by Gerrit Code Review 7 months ago

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

Updated by Gerrit Code Review 7 months ago

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

Updated by Karsten Dambekalns 5 months ago

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

Also available in: Atom PDF