[TYPO3-mvc] Problems in Extbase Persistence / Typo3DbBackend

Philipp Wrann philippwrann at gmail.com
Thu Feb 20 10:11:48 CET 2014


Hey, i reported a few issues about the extbase persistence but i dont think they will be dealt with soon, so i want to start a discussion here on how to fix 2 bugs in the extbases Typo3DbBackend Class.

There are currently 2 Problems many developers have to fix on their own by overloading the Typo3DbBackend.

1) Many of us encountered the missing match_fields logic in the query generation. That results in wrong relation matching and for filtering non-useable properties. For example: You set your record categorizeable with the categorization API. The relation is written with tablenames and fieldname information but that constraint is never added. So you get results nobody ever related to those categories because a page or news or contet elment of the same id has a relation.

2) self-joins:
Whenever you relate a model to an other model of the same type (same table in the backend) the joind looks like:
select * from person left join person on person.parent = person.uid

instead of
select * from person left join person as parent on person.parent = parent.uid

This is a big problem, a query like:
query->equals('parent.gener','male');
wont work except the parent is stored in a different table

One solution could be:
store the relation allways in an mm_table (which leeds us the the first problem, cause this way you would need many mm_tables if using many relation)

So i would say: The Typo3DbBackend needs a refactoring and remake.

1) mm_match_fields have to be added to constraints
2) aliases have to be generated for joins, so the whole addUnionStatement functionallity needs to be extended.

I need those features for an extension that has to work with TYPO3 CMS 6.2 so if those things wont be fixed in 6.2 i would have to write my own overloaded Backend. At the moment i have a very quick and dirty fix for those things.

reported issues on this:
http://forge.typo3.org/issues/55959
http://forge.typo3.org/issues/54250
http://forge.typo3.org/issues/10487
http://forge.typo3.org/issues/11251
http://forge.typo3.org/issues/39256

Those features are absolutely mandatory to make extbase actually work.


More information about the TYPO3-project-typo3v4mvc mailing list