[TYPO3-mvc] Collecting ideas how to fetch/query valueObjects for stuff like tagClous the best way

Franz Koch typo3.RemoveForMessage at elements-net.de
Sat May 29 17:12:39 CEST 2010


Hey there,

I'm currently building a new extbase extension and am more than amazed 
by the new features in the query object that really ease up building 
complex queries - especially the possibility to pass a object path is 
really great (thanks for that Jochen).

But all the magic has one downside - a very complex QOM backend that's 
really hard to understand and use. So I'm currently looking for a way on 
how to get assigned valueObjects for a tagCloud/filterOption in an easy, 
yet fast way.


This is my dependency structure:
Exhibition -> Hall -> Booth -> Exhibitor -> Tags


What I need are tags per exhibition. Currently I'm iterating all the way 
down to the exhibitors and merge the tags in a ObjectStorage, but that's 
not very nice (many small queries). I see four ways to improve this:

a) fetch all exhibitors at once via a repository and then iterate them
b) make the tags entities, add a property with back reference to the 
exhibitors and then use a repository
c) find a way to directly query for those using the QOM of extbase
d) use a repository with a good old handmade statement and keep the 
valueObjects


Of course I prefer c) - but how to use the QOM to compare a property to 
a query for a different model? Something like this would be nice I think:


$query = $this->createQuery();
$exhibitorQuery = $this->createQuery('ExhibitorModel');

$query->join('uid', 'tags.uid', $exhibitorQuery)
	->matching( $exhibitorQuery-equals('booth.hall.exhibition', $exhibition) )
	->execute();



Any further ideas, suggestions on how to address such usecases in 
future? Probably we can come up with a nice concept for a new api method 
(like the ->join method for queryObjects in my example).

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list