[TYPO3-mvc] sub-models within the model table
Martin Kutschker
masi-no at spam-typo3.org
Sun Apr 18 22:27:06 CEST 2010
Hi!
Let's assume we have a customer model. It has two addresses one for shipping and one for billing. We
further assume that we don't need tha address on it's own (quite likely in a shop application) and
so we don't want to create a separate address table.
The table looks like this:
id
name
shipping_address
shipping_postcode
shipping_city
billing_address
billing_postcode
billing_city
My idea is now to model those two addresses as models with the customer model rather then a bunch of
unrelated properties of the customer. If the address sub-model is general enough it could be reused
in any other model (and table).
Do you think this kind of setup makses sense?
Masi
More information about the TYPO3-project-typo3v4mvc
mailing list