[TYPO3-mvc] model properties?
Daniel Dimitrov
danielsd_bg at yahoo.fr
Thu Apr 22 10:28:19 CEST 2010
Hey Jochen,
Thank you for the reply!
I'm trying to confirm what you wrote, but somehow it doesn't function for
me.
I changed the database field to short_description.
I also changed my tca:
'short_description' => array(
'exclude' => 1,
'label' =>
'LLL:EXT:bw_shop/Resources/Private/Language/locallang_db.xml:tx_bwshop_domain_model_products.shortDescription',
'config' => array(
'type' => 'text',
'rows' => 5,
'cols' => 30,
)
)
I see the field in the backend and I'm able to save the data to the
database.
In my model I have a variable
private shortDescription;
but this shortDescription is not matched to the database short_description?
Should I configure something more or did I missunderstand something?
Regards,
Daniel
"Jochen Rau" <jochen.rau at typoplanet.de> wrote in message
news:mailman.1.1271839967.11637.typo3-project-typo3v4mvc at lists.typo3.org...
> Hi Daniel.
>
> On 21.04.10 10:42, Daniel Dimitrov wrote:
>> hey Soren,
>> Hm this means that I have to change the field short_description in the
>> database too.
>> Afte few tests:
>> short_description and shortDescription are not accepted.
>>
>> only shortdescription is a valid database field that can be
>> automatically understood from extabase.
>> Isn't this a little too restrictive?
>
> The naming conventions are: lowerCamelCase for properties and
> lowercase_underscore for fiueld names. Extbase converts the names
> automatically. So: "short_description" in the table matches
> "shortDescription" in the class witghout any further configuration.
>
> Regards
> Jochen
More information about the TYPO3-project-typo3v4mvc
mailing list