Bug #68994
closed
It is not possible to save NULL (replaced by the string "NULL")
Added by Sebastian Mazza over 9 years ago.
Updated about 6 years ago.
Sprint Focus:
On Location Sprint
Description
If a model property with any simple type (string, int, float, bool) is NULL, it will be replaced by the string literal 'NULL' before the update query is created.
I just replaced the following code:
if ($input === NULL) {
return 'NULL';
}
with:
if ($input === NULL) {
return null;
}
in
TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::getPlainValue(...)
and everything works fine, at least within my extension.
Category should be Extbase.
I can totally second this requirement — being able to use NULL values in the database for simple types is an absolute MUST and should be tackled as soon as possible.
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43627
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43627
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43627
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43627
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43627
Problem was introduced with #57255.
This bug still occurs in 8.7.
Has anybody experience with the proposed patch? Is it safe to use?
- Sprint Focus set to On Location Sprint
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF