Actions
Bug #65496
closeddbType datetime not working when using manual table mapping
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2015-03-03
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
Write to table is not working, because Extbase tries to save Unix-Timestamp instead of format '0000-00-00 00:00:00'.
Also the property is empty when reading.
mySQL-Database with native Datetime-Field.
TCA, Model etc. was created with Extension Builder. When I use the created table instead of custom_table (without mapping),
everything works fine. So there seems to be a difference when using table-mapping.
custom_field datetime DEFAULT '0000-00-00 00:00:00',
TCA:
'custom_field' => array( 'exclude' => 1, 'label' => 'Datum', 'config' => array( 'dbType' => 'datetime', 'type' => 'input', 'size' => 12, 'eval' => 'datetime', 'checkbox' => 0, 'default' => '0000-00-00 00:00:00' ), ),
Typoscript-Mapping:
MyVendor\MyExt\Domain\Model\Nachricht { mapping { tableName = custom_table columns { custom_field.mapOnProperty = antwortDatum } } }
Model:
/** * antwortDatum * * @var \DateTime */ protected $antwortDatum = NULL;
Actions