Actions
Bug #62545
closedRecord type constraints of subclasses prevent loading of parent class objects
Status:
Closed
Priority:
-- undefined --
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2014-10-29
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint
Description
Hi there,
following scenario:
class Mother {
}
class Daughter extends Mother {
}
config.tx_extbase.persistence.classes {
Mother {
mapping {
tableName = tt_content
}
}
Rattazonk\Extbasepages\Domain\Model\Content\Shortcut {
mapping.recordType = littleGirl
}
Mother.subclasses.1414596636 = Daughter
}
I had a mother class for some tt_content types. Now I found a special case and needed polymorphism, so I implemented the Daughter class with the recordType littleGirl. So the DaughterRepository only returns little girls. But the MotherRepository doesnt work anymore because of a constraint for types because of the subclasses type constraint.
Already wrote a patch, I am going to upload it to gerrit.
So as a summary:
A subclass with a defined recordType in extbase breaks a parent class without a type.
Actions