[TYPO3-mvc] resolve single table inheritance objects
Felix Oertel
f at oer.tel
Fri Apr 1 10:31:59 CEST 2011
Am 01.04.11 01:02, schrieb Thomas "Thasmo" Deinhamer:
> It should work, I'm using it as well since TYPO3 4.4 at least.
yeah, i also think it SHOULD work, but it doesn't. *g*
to minimize confusion:
we've got a domain model "Event" which is not used directly. we've got
two domain models "Workshop" and "Exhibition" which extend "Event" and
are used for records. we've got STI configured correctly via TCA and all
the records are stored in tx_ext_domain_model_event.
when i call
$workshopRepository->findByUid()
i'll get one object of type Tx_Ext_Domain_Model_Workshop. this is
correct behaviour.
but when i call
$event->repository->findByName('foo')
i'll get back an objectStorage with objects of type
Tx_Ext_Domain_Model_Event.
but in real there are no "events", only "workshops" and "exhibitions"
which extend "Event". correct behaviour of extbase would be to return an
objectStorage with objects of type either Tx_Ext_Domain_Model_Workshop
or Tx_Ext_Domain_Model_Exhibition.
but this is not the case.
regards, foertel
More information about the TYPO3-project-typo3v4mvc
mailing list