[TYPO3-mvc] extbase : Sort of MM-Query in

Jochen Rau jochen.rau at typoplanet.de
Tue Jan 26 11:45:49 CET 2010


Hi Sebastian.

On 08.01.10 10:25, Sebastian Schreiber wrote:
> Imagine the following situation:
>
> - Table = articles
> - Table = categories
>
> Articles have many categories assigned, stored in
> - Table = artlices_categories_mm
>
> How can i get all articles with a given category over the table
> artlices_categories_mm with extbase?
>
> Any suggestions?

There is currently no easy way to find objects matching an mm related 
object property, like

public function findAllByTag(Tx_BlogExample_Domain_Model_Tag $tag) {
	$query = $this->createQuery();
	return $query->matching($query->equals('tags.title', $tag->getTitle()))
		->setOrderings(array('date' => 
Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING))
		->execute();
}

There is a related feature request
http://forge.typo3.org/issues/show/4679

Let's discuss about how to invoke that and let's see how far we get 
during the T3BOARD to implement it.

Regards
Jochen


More information about the TYPO3-project-typo3v4mvc mailing list