[TYPO3-mvc] Could not get value from SYS_LASTCHANGED

Dimanche Eat dimanche at web-essentials.asia
Thu Jan 26 04:18:52 CET 2012


Hi Violeng,

I spent a long time to find it. Now, it works very well.
Thank you very much.

Have a good day!

Dimanche


> Hi Dimanche,
>
> Here the solution I think it should work.
> // add this code to ext_table.php
> t3lib_extMgm::addTCAcolumns('pages', array (
>
> 'SYS_LASTCHANGED' => array (
> 'exclude' => 0,
> 'label' => 'xxx',
> 'config' => array (
> 'type' => 'datetime'
> )
> )
> )
> );
>
> Then in table mapping configuration
> config {
> tx_extbase {
> persistence {
> updateReferenceIndex = 1
> classes {
> Tx_XX_Domain_Model_Page {
> mapping {
> tableName = pages
> columns {
> SYS_LASTCHANGED.mapOnProperty = sysLastchanged
> }
> }
> }
> }
> }
> }
> }
>
> Hope it can help.
>
> Cheers,
> Violeng
>
> On 1/24/2012 3:09 PM, Dimanche Eat wrote:
>> Hi all,
>>
>> I have tried to map my model with table pages, then I want to access a
>> few fields to display in my view. Here is my typoscript setup:
>>
>> config {
>> tx_extbase {
>> persistence {
>> updateReferenceIndex = 1
>> classes {
>> Tx_XX_Domain_Model_Page {
>> mapping {
>> tableName = pages
>> columns {
>> tstamp.mapOnProperty = tstamp
>> sys_lastchanged.mapOnProperty = sys_lastchanged
>> }
>> }
>> }
>> }
>> }
>> }
>> }
>>
>> So, my problem is that I could not get the value from SYS_LASTCHANGED,
>> but I can get the value from tstamp.
>>
>> Is there any special configuration with SYS_LASTCHANGED?
>>
>> Really appreciate for any input.
>>
>> Thank you,
>> Dimanche
>>



More information about the TYPO3-project-typo3v4mvc mailing list