[TYPO3-mvc] Does Extbase handle references of 'inline' records correctly?
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Wed Dec 23 00:29:47 CET 2009
Ah, thanks for the hint!
Is there a chance to get a feature into Extbase
which transforms the trailing letter of an underscore
to an uppercase letter?
Would convert 'tx_EXT_domain_model_product_price'
to 'ProductPrice', or 'tx_EXT_domain_model_product_price_vat'
to ProductPriceVat'. Seems to me a more elegant way to
solve the automatic name converting.
Otherwise I'd need to have a class Productpricevat or
Product_price_vat.
Oppinions?
Thomas
Jochen Rau schrieb:
> Hi.
>
> schrieb Thomas "Thasmo" Deinhamer:
>> Hello!
>>
>> Accessing related ('inline') objects inside a fluid template,
>> gives me a SQL error, like (shortended):
>>
>> "SELECT * FROM tx_EXT_domain_model_table LEFT JOIN ON tx_EXT_domain..."
>>
>> For some reason after 'LEFT JOIN' the table is missing which should
>> get joined inside the query. Unfortunately I have no clue which table
>> should get joined there, as the error message truncated the SQL query,
>> thererfore I don't know what is queried.
>>
>> Is there a problem with the TCA of inline records regarding Extbase?
>>
>> I must admit, that my table names for inline records are named
>> a bit different than the other tables. These are my tables and
>> their model classes:
>>
>> PRODUCT
>> Table: tx_EXT_domain_model_product
>> ClassFile: Classes/Domain/Model/Product.php
>> ClassName: Tx_EXT_Domain_Model_Product
>>
>> PRODUCT PRICE
>> Table: tx_EXT_domain_model_product_price
>> ClassFile: Classes/Domain/Model/ProductPrice.php
>> ClassName: Tx_EXT_Domain_Model_ProductPrice
>>
>> Could this be the reason for the SQL error?
>
> Yes. By default, the table name must be the class name in lowercase.
>
> tx_EXT_domain_model_productprice
>
> instead of
>
> tx_EXT_domain_model_product_price
>
> Otherwise you have to define a mapping rule (see
> ext_typoscript_setup.txt of Extbase).
>
> Regards
> Jochen
>
More information about the TYPO3-project-typo3v4mvc
mailing list