#79473Typo3DbQueryParser fails since Doctrine by comparing date fields
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.
Reviews 5
- 13.4 88951[BUGFIX] Fix native datetime transformation in Extbase query constraints
- main 88840[BUGFIX] Fix native datetime transformation in Extbase query constraints
- main 51817[BUGFIX] Update comparison for datetime storage
- TYPO3_8-7 53244[BUGFIX] Use the correct named parameter type in Extbase queries
- main 52802[BUGFIX] Use the correct named parameter type in Extbase queries
Related issues 5
- Bug #63482Query constraint on a DateTime field with a DateTime argument should trigger date format
- Bug #77379Doctrine: Migrate extbase Typo3DbBackend and Typo3DbQueryParser
- Bug #81019Query Builder: Error when ordering by DateTime fields
- Bug #81056Query Builder fails on greater / less comparisons on string fields
- Epic #90106[Extbase] Priority Bugfixes