---
title: "Deprecation: #78225 - Legacy PreparedStatements within Extbase"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-78225"
source: "Changelog/8.6/Deprecation-78225-LegacyPreparedStatementsWithinExtbase.rst"
modified: "2026-09-15T10:46:36+00:00"
---

# Deprecation: #78225 - Legacy PreparedStatements within Extbase

See [forge#78225](https://forge.typo3.org/issues/78225)

## Description

Extbase has a way to set raw statements with PreparedStatements based on the legacy DatabaseConnection a.k.a. `TYPO3_DB`.
This functionality has been marked as deprecated.

## Impact

Calling a query within Extbase with `$query->setStatement($preparedStatement)` using a
`\TYPO3\CMS\Core\Database\PreparedStatement` object will trigger a deprecation log entry.

## Affected Installations

Any TYPO3 extension with Extbase functionality using custom prepared statements with the legacy database API.

## Migration

Use the same method `setStatement()` and provide a QueryBuilder object or a Statement object based on Doctrine DBAL.
