[FOLLOWUP][BUGFIX] Extbase: Use fully populated records in insertObject() 21/42821/3
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 21 Aug 2015 16:02:49 +0000 (18:02 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 30 Aug 2015 09:26:30 +0000 (11:26 +0200)
commit0e37d59849b5f20c5e094a93f965e2d91fe38e87
treed53d9610ed8973a1245491b1f65fa855cb7c6215
parent86ebff477cc0b01d49feb4c923195a7f1d5bb12c
[FOLLOWUP][BUGFIX] Extbase: Use fully populated records in insertObject()

As it is common practice to define object properties in Extbase models
without default values (resulting in a NULL value) while defining the
database columns as `DEFAULT '' NOT NULL` these columns need to be
skipped when preparing a new record for insertion into the database.
This allows the database to use the configured defaults for columns
not included in the insert statement.

To properly support strict databases in an Extbase extension/model it is
required to configure identical/compatible default values in the
database schema and the model. This problem cannot be solved completely
programmatically.

Resolves: #69247
Related: #69084
Releases: master
Change-Id: I9de6a68a9eac25e171e3bfde6314366dad1ae346
Reviewed-on: http://review.typo3.org/42821
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Documentation/Changelog/master/Important-69084-AddingExtbaseObjectsWithNOTNULLColumnsHasChanged.rst [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php