[TYPO3-mvc] Correct mapping of tables and fields via Typoscript
Jochen Rau
jochen.rau at typoplanet.de
Wed Feb 3 12:00:44 CET 2010
Hi Thomas,
On 29.01.10 23:55, Thomas "Thasmo" Deinhamer wrote:
> Good evening,
> sorry for spamming the list with new topics,
> but a lot of questions came up the past week.
>
> For now I do map special named classes or fields
> like this:
>
> config.tx_extbase {
> persistence {
> classes {
> Tx_EXT_Domain_Model_Object {
> mapping {
> tableName = table
>
> columns {
> tx_ext_field.mapOnProperty = field
> }
> }
>
> columns {
> field.foreignClass = Tx_Ext_Domain_Model_Object
> }
> }
> }
> }
> }
>
> Is this the correct way? I'm wondering if the nesting is okay?
> Also is it better to defined the mapping inside the extension itself, like:
>
> plugin.tx_ext {
> persistence {
> ...
> }
> }
The lines
columns {
field.foreignClass = Tx_Ext_Domain_Model_Object
}
are obsolete and not properly nested neither.
plugin.tx_ext {
persistence{...}
}
should also work. Please report an issue if not.
Jochen
More information about the TYPO3-project-typo3v4mvc
mailing list