[TYPO3-mvc] table mapping issues
Thomas Mammitzsch
thomas at visualworx.de
Tue Aug 31 14:32:44 CEST 2010
Ok, now i got it. It was a typo. My model class was
Tx_Cdebayarticles_Domain_Model_Dam and my repository class was
Tx_Cdebayarticles_Domain_Repository_damRepository (the d of dam is upper
case in the model). When trying to map, the data mapper was looking for
the Model class with the "dam" not "Dam", so my setup didn't work. I
changed my model to the lower cased version and it works now :)
regards, Thomas
Am 31.08.2010 13:57, schrieb Thomas Mammitzsch:
> Hi Franz,
>
> ok, just changed it but i still get
>
> "#1247602160: Table 'viervier.tx_cdebayarticles_domain_model_dam'
> doesn't exist: SELECT tx_cdebayarticles_domain_model_dam.* FROM
> tx_cdebayarticles_domain_model_dam WHERE
> tx_cdebayarticles_domain_model_dam.uid IN ('1','2','4','3','5','6') "
>
> regards, Thomas
>
> Am 31.08.2010 09:19, schrieb Franz Koch:
>> Hey,
>>
>>> i try to map a model to the dam table:
>>>
>>> config.tx_extbase.persistence.classes {
>>> Tx_Cdebayarticles_Domain_Model_Dam.mapping {
>>> tablename = tx_dam
>>> recordType = Tx_Cdebayarticles_Domain_Model_Dam
>>> }
>>> }
>>
>> a recordType doesn't help in that case - you first have to bind your
>> className to the tableName of DAM:
>>
>> config.tx_extbase.persistence.classes {
>> Tx_Cdebayarticles_Domain_Model_Dam {
>> className = Tx_Cdebayarticles_Domain_Model_Dam
>> mapping {
>> tableName = tx_dam
>> }
>> }
>> }
>>
>> Then you could define recordTypes for singleTable inheritance (if
>> needed).
>>
>
More information about the TYPO3-project-typo3v4mvc
mailing list