Issue Bug Closed

#79473Typo3DbQueryParser fails since Doctrine by comparing date fields

Georg Ringer 01/26/17, 08:36 updated 12/02/25, 14:36

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