[TYPO3-mvc] Correct mapping of tables and fields via Typoscript

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Fri Jan 29 23:55:36 CET 2010


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 {
     ...
   }
}

Thanks a lot,
Thomas


More information about the TYPO3-project-typo3v4mvc mailing list