Extbase persistence – models and the database
Extbase provides its own way to persist and retrieve data using models and repositories, which are built on top of TYPO3's database abstraction layer.
Repositories in Extbase usually define custom find*
methods and rely on
\TYPO3\
to perform queries on models.
While Extbase persistence is the standard way to work with data in Extbase, you can also use the DBAL QueryBuilder directly within an Extbase context when:
- You need better performance on large datasets.
- You are performing complex queries (aggregates like
SUM
,AVG
, ...).
Note
Extbase queries and DBAL queries are not interchangeable. Extbase uses its own persistence layer with different concepts and behaviors. Use each approach where it fits best — and avoid mixing them in the same method or query logic.