Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2015-08-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
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.


Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Task #57255: Cleanup redundant code in extbase persistenceClosed2014-03-24

Actions
Related to TYPO3 Core - Bug #80119: Constraint Unique, Default null - String property ORMNew2017-03-03

Actions
Actions #1

Updated by Sebastian Mazza over 9 years ago

Category should be Extbase.

Actions #2

Updated by Morton Jonuschat over 9 years ago

  • Category set to Extbase
Actions #3

Updated by Joschi Kuphal about 9 years ago

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.

Actions #4

Updated by Gerrit Code Review about 9 years ago

  • 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

Actions #5

Updated by Gerrit Code Review about 9 years ago

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

Actions #6

Updated by Gerrit Code Review about 9 years ago

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

Actions #7

Updated by Gerrit Code Review about 9 years ago

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

Actions #8

Updated by Gerrit Code Review about 9 years ago

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

Actions #9

Updated by Gernot Leitgab over 8 years ago

Problem was introduced with #57255.

Actions #10

Updated by Gerrit Code Review over 8 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49133

Actions #11

Updated by Gerrit Code Review over 8 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43627

Actions #12

Updated by Gerrit Code Review about 8 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43627

Actions #13

Updated by Anonymous over 7 years ago

This bug still occurs in 8.7.
Has anybody experience with the proposed patch? Is it safe to use?

Actions #14

Updated by Gerrit Code Review over 7 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43627

Actions #15

Updated by Gerrit Code Review over 7 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43627

Actions #16

Updated by Gerrit Code Review about 7 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43627

Actions #17

Updated by Susanne Moog almost 7 years ago

  • Sprint Focus set to On Location Sprint
Actions #18

Updated by Gerrit Code Review almost 7 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43627

Actions #19

Updated by Gerrit Code Review almost 7 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43627

Actions #20

Updated by Gerrit Code Review almost 7 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54877

Actions #21

Updated by Anonymous almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #22

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF