Bug #80978
closedTYPO3 Query Builder: not able to compare floating point numbers (except equal)!
0%
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;
Updated by Georg Ringer over 7 years ago
- Is duplicate of Bug #79473: Typo3DbQueryParser fails since Doctrine by comparing date fields added
Updated by Riccardo De Contardi over 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.
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Ian Solo over 7 years ago
- Status changed from Under Review to Resolved
Applied in changeset 0bd1746384980d9f6f7387d8638d280443ee843b.