[TYPO3-mvc] single table inheritance - subclasses

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Apr 13 16:42:22 CEST 2012


Hi,

> FrontendUser
> |-UniversityUser
> |-Student
> |-Employee
> |-Lecturer
>
> If you query the FrontendUserRepository, there are only hits for the
> types FrontendUser and UniversityUser, but not for the three subclasses
> of UniversityUser. The constraint only includes the next level of the
> inheritance structure.
>
> This is not intended, is it?

in doubt, just create a UniversityUserRepository, because I suppose you 
never expect to just get a FrontendUser back anyway. Or define 
"Student", "Employee" and "Lecturer" as direct subclasses of 
FrontendUser (STI wise) while keeping the PHP subclassing as is. Both 
should work IMO.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list