[BUGFIX] Allow subclasses of \DateTime as entity properties 34/39534/5
authorStephan Schuler <stephan.schuler@netlogix.de>
Wed, 13 May 2015 13:05:35 +0000 (15:05 +0200)
committerAndreas Wolf <andreas.wolf@typo3.org>
Wed, 5 Aug 2015 17:29:31 +0000 (19:29 +0200)
commit706385766a4a2e557901279bc38cdc26dccbb0eb
tree70466bb952860096d24fe5a3a3886160a0c889dd
parent7a63ad91a8dc4a721b658fb641db3237da22419b
[BUGFIX] Allow subclasses of \DateTime as entity properties

When a class "\MyCustomDateTime extends \DateTime", the data mapper
creates "\DateTime" objects instead when mapping database results.
This patch uses the class annotation to resolve the class to create.

Change-Id: I45062d4d1a44333016258289ea9e2026d9923f70
Resolves: #66939
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/39534
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php [changed mode: 0644->0755]
typo3/sysext/extbase/Tests/Unit/Persistence/Fixture/Model/CustomDateTime.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php