[TYPO3-english] Can Extbase Repository with STI return objects of subclasses?

Viktor Livakivskyi invisible.kinder at gmail.com
Mon Aug 24 19:47:30 CEST 2015


Hi, List.

I'm using STI (Single Table Inheritance) and I'd like Repository of parent Entity to return collection of child entities. From what I read in manual [1] it should be possible:
"In the result set $organizationRepository there are domain objects of the class Tx_MyExtension_Domain_Model_Organization and all configured subclasses Tx_MyExtension_Domain_Model_Company and Tx_MyExtension_Domain_Model_ScientificInstitution are included."

In my case repository always return only prent entities. Did I get the idea right or I'm missing something?

[1]: https://docs.typo3.org/typo3cms/ExtbaseFluidBook/6-Persistence/5-modeling-the-class-hierarchy.html


More information about the TYPO3-english mailing list