Project

General

Profile

Actions

Bug #80119

open

Constraint Unique, Default null - String property ORM

Added by Noel Blaschke about 7 years ago. Updated over 5 years ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2017-03-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hey guys,

it's not possible to have a table with a column unique constraint that has also the default value NULL (not a string).

Updating a model with its setter method e.x.: model->setProp(NULL) will convert the NULL value to string 'NULL'.

Code: https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php#L415

Creating a second model and updating its property to NULL will throw an exception because the database integrity is violated (2 columns with string 'NULL' can't exist).

In another case this is already considered:

https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php#L409


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #68994: It is not possible to save NULL (replaced by the string "NULL")Closed2015-08-12

Actions
Actions #1

Updated by Riccardo De Contardi over 5 years ago

  • Category set to Extbase
Actions

Also available in: Atom PDF