[TYPO3-mvc] Relation to fe_user / Tx_Extbase_Domain_Model_FrontendUser

Franz Koch typo3.RemoveForMessage at elements-net.de
Sat Jan 15 14:27:47 CET 2011


Hey Stephan,

>> did you configure the single table inheritance in your setup?
>>
>
> No. Because in fact, I don't want to inherit anything, I just want to
> make a relation to an existing domain model. Therefore I thought it
> shouldn't be necessary. Is this a misconception?

well, thing is, that the default extbase configuration is that the 
Tx_Extbase_Domain_Model_FrontendUser is bound to only a certain 
recordType which is most likely not set for your fe_users. Thus you 
won't get the according model.

In order to change that, you have to cancel the binding to that 
recordType and make it the default model for fe_users.

---- default TS coming from extbase --------------
config.tx_extbase.persistence.classes {
	Tx_Extbase_Domain_Model_FrontendUser {
		mapping {
			tableName = fe_users
			recordType = Tx_Extbase_Domain_Model_FrontendUser
			columns {
				lockToDomain.mapOnProperty = lockToDomain
			}
		}
	}
}
-------------------------------------------------

---- What you have to add in your TS template ---
config.tx_extbase.persistence.classes {
	Tx_Extbase_Domain_Model_FrontendUser {
		mapping.recordType >
	}
}
-------------------------------------------------

Then clear the cache and be happy :)

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list