Project

General

Profile

Actions

Bug #79473

open

Typo3DbQueryParser fails since Doctrine by comparing date fields

Added by Georg Ringer over 7 years ago. Updated about 2 years ago.

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

100%

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

Description

Since the move to native Doctrine querybuilding in extbase with #77379, the comparing using calls like greaterThan,lessThan,... fail if a date field should be compared.

The error can easily be spotted by taking a look into the method parseDynamicOperand Github

case QueryInterface::OPERATOR_LESS_THAN_OR_EQUAL_TO:
                $value = $this->queryBuilder->createNamedParameter($this->dataMapper->getPlainValue($value), \PDO::PARAM_INT);
                $expr = $exprBuilder->comparison($fieldName, $exprBuilder::LTE, $value);
                break;

Using PDO::PARAM_INT is wrong if in the DB an actual date or datetime type is used.


Related issues 8 (1 open7 closed)

Related to TYPO3 Core - Bug #77379: Doctrine: Migrate extbase Typo3DbBackend and Typo3DbQueryParserClosedMarkus Hölzle2016-08-03

Actions
Related to TYPO3 Core - Bug #81019: Query Builder: Error when ordering by DateTime fieldsClosed2017-04-26

Actions
Related to TYPO3 Core - Bug #81056: Query Builder fails on greater / less comparisons on string fieldsClosed2017-04-28

Actions
Related to TYPO3 Core - Bug #63482: Query constraint on a DateTime field with a DateTime argument should trigger date formatNew2014-12-01

Actions
Related to TYPO3 Core - Epic #90106: [Extbase] Priority BugfixesClosed2018-03-07

Actions
Has duplicate TYPO3 Core - Bug #80978: TYPO3 Query Builder: not able to compare floating point numbers (except equal)!Closed2017-04-24

Actions
Has duplicate TYPO3 Core - Bug #81487: Quoting error for date field when building query in extbase repositoryClosed2017-06-06

Actions
Has duplicate TYPO3 Core - Bug #81719: DateTime comparisons not possible in 8.7Closed2017-06-27

Actions
Actions

Also available in: Atom PDF