[TYPO3-mvc] Mapping property to a MM Relation

Dirk Rauscher dr_typo3 at itb-institut.de
Tue Oct 25 13:44:47 CEST 2011


Hi there,

my Tx_Myext_Domain_Model_Customer class extends the class 
Tx_Extbase_Domain_Model_FrondendUser with 3 additional properties.

The property 'service' is an object of type Tx_Myext_Domain_Model_Service.

In TCA I declared the additional fields to fe_users.
The property 'service' is declared as a MM-Relation.

	"tx_itbmemento_servicepackage" => Array (
		"exclude" => 1,
		"label" => "Service",
		"config" => Array (
          "type" => "group",
          "internal_type" => "db",
          "allowed" => "tx_itbmemento_domain_model_servicepackagetemplate",
          "MM" => 'tx_itbmemento_fe_users_servicepackagetemplate_mm',
          "multiple" => 0,
          "minitems" => 1,
          "maxitems" => 1,
          "size" => 1,
       ),
	),


In TS the mapping is included:

  Tx_ItbMemento_Domain_Model_Customer {
     mapping {
        tableName = fe_users
        columns {
           tx_itbmemento_agb.mapOnProperty = agbAccepted
           tx_itbmemento_agb_date.mapOnProperty = agbAcceptedDate
           tx_itbmemento_servicepackage.mapOnProperty = servicepackage
        }
     }
  }


When I retrieve an Tx_Myext_Domain_Model_Customer Object from DB 
everything is loaded but the property 'servicepackage'.
I get a SQL error that lacks of a table name where servicepackages are 
stored:



Where did I forget to supply information about the missing table name? 
Or isn't it possible to get the object the way I did it?
Any hint is highly appreciated! Thanks a lot

Dirk


More information about the TYPO3-project-typo3v4mvc mailing list