[FLOW3-general] Single table inheritance and property mapper
Helmut Hummel
helmut.hummel at typo3.org
Sun Nov 11 17:21:44 CET 2012
Hi,
in the Extbase team the following question arose:
How does the property mapper deals with single table inheritance when a
base class is annotated in the controller. Let's assume the following:
class DebitIncome extends Income {}
class CashIncome extends Income {}
public function createAction(Domain\Model\Income $income) {}
<f:form object="{CashIncome}" action="create">
...
<f:form object="{DebitIncome}" action="create">
...
Although in the Fluid template the objects are clearly of one special
type (Cash or Debit), the property mapper only looks for the action
annotation to determine the type of object to be created.
I have not checked, but I assume it's the same in Flow currently.
Would it make sense to render the object type in a hidden field and use
this information in the property mapper?
Security might be an issue here, but this can be easily handled by
hashing this information.
Is this a valid usecase?
Any other ideas (except writing different actions, which would of course
work)?
Kind regards,
Helmut
--
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 Core Developer, TYPO3 Security Team Member
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list