[TYPO3-mvc] findByProperty() - Repository Method
Frank Mey - NEW.EGO
mey_mailings at newego.de
Tue May 10 12:51:56 CEST 2011
Hi list,
I use the findByProperty()-Method in a Controller action, that as a
Tx_Domain_Model. Object assigned.
The corresponding property of the model is a m-m relation thus a
Persistent_object_storage that holds objects of
the type I assigned to the controller action.
Here is some code-Sample to make it clearer:
/**
* Displays all articles of one category
* @param Tx_NeTestExt_Domain_Model_Kategorie $kategorie
* @return void
*/
public function listcatAction(Tx_NeTestExt_Domain_Model_Kategorie
$kategorie) {
// debug($kategorie->getUid());
$articles =
$this->articlesRepository->findByCategory($kategorie);
$this->view->assign('articles', $articles);
}
Sadly even though the Kategorie-Object is passed right (as i can debug ist
settings),
No articles are returned. I checked the m-m relation database table and the
entries there are right (uid_foreign holds "1" for several article uids).
Any clue why that mechanism doesn't work here ?
There are no error messages in the output, just empty result.
Btw: Is there a way to debug the SQL-statement the
persistence-manager-object sends to the database ?
Thx,
Frank
More information about the TYPO3-project-typo3v4mvc
mailing list