Project

General

Profile

Actions

Bug #80978

closed

TYPO3 Query Builder: not able to compare floating point numbers (except equal)!

Added by Timo Kiefer about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2017-04-24
Due date:
% Done:

0%

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

Description

Hi,

it takes me hours to find out that all comparisons numbers parsed to Integer!!!
Please also take care of floating point numbers when you convert the TYPO3 QueryBuilder to Doctrine QueryBilder in Typo3DbQueryParser class.

Bug-Snippet of Typo3DbQueryParser.php:


           case QueryInterface::OPERATOR_LESS_THAN:
                $value = $this->queryBuilder->createNamedParameter($this->dataMapper->getPlainValue($value), \PDO::PARAM_INT);
                $expr = $exprBuilder->comparison($fieldName, $exprBuilder::LT, $value);
                break;
            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;
            case QueryInterface::OPERATOR_GREATER_THAN:
                $value = $this->queryBuilder->createNamedParameter($this->dataMapper->getPlainValue($value), \PDO::PARAM_INT);
                $expr = $exprBuilder->comparison($fieldName, $exprBuilder::GT, $value);
                break;
            case QueryInterface::OPERATOR_GREATER_THAN_OR_EQUAL_TO:
                $value = $this->queryBuilder->createNamedParameter($this->dataMapper->getPlainValue($value), \PDO::PARAM_INT);
                $expr = $exprBuilder->comparison($fieldName, $exprBuilder::GTE, $value);
                break;

Related issues 1 (1 open0 closed)

Is duplicate of TYPO3 Core - Bug #79473: Typo3DbQueryParser fails since Doctrine by comparing date fieldsNew2017-01-26

Actions
Actions #1

Updated by Georg Ringer about 7 years ago

  • Is duplicate of Bug #79473: Typo3DbQueryParser fails since Doctrine by comparing date fields added
Actions #2

Updated by Georg Ringer about 7 years ago

  • Is Regression set to Yes
Actions #3

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from New to Closed

I close this in favor of #79473 please continue the discussion there. I've added there the description of this issue to keep track of it.

Actions #4

Updated by Gerrit Code Review almost 7 years ago

  • Status changed from Closed to Under Review

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/52802

Actions #5

Updated by Gerrit Code Review almost 7 years ago

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

Actions #6

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/53244

Actions #7

Updated by Christian Toffolo almost 7 years ago

  • Status changed from Under Review to Resolved
Actions #8

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF