[TYPO3-mvc] Problems with nested page-objects

Dennis Ahrens dennis.ahrens at googlemail.com
Mon Sep 5 09:51:48 CEST 2011


Hi Stefan,

i'll try to use TypoScript to configure the pid field. You don't need 
any special Repository calls - the persistence layer will resolve the 
relation itself.

config.tx_extbase.persistence.classes.Tx_YourExtension_Domain_Model_Page {
mapping {
	tableName = pages
	columns.pid {
		mapOnProperty = nestedPages
		foreign_table = pages
		foreign_class = Tx_YourExtension_Domain_Model_Page
		foreign_field = pid
	}
}


Mark $nestedPages as lazy to prevent unneccessary SQL queries, when 
dealing with your model.

regards
Dennis


More information about the TYPO3-project-typo3v4mvc mailing list