[TYPO3-mvc] Findby* returns the exact number of objects but null
RAKIBI Anass
anass.rakibi at gmail.com
Fri Dec 5 14:51:49 CET 2014
Hey ,
my findbypay ( pay beeing here as a parameter) returns the exact number of entries in the database but the objects are null ...
here is how I use it in an action :
public function getMyCompanysAction()
{
$argument = $this->request->getArguments('id');
$companies = $this->entrepriseRepository->findBypay(2)->toArray(); // just to test with the id 2
return json_encode($companies);
}
the outputed json array contains 3 braces but is empty .. [{},{},{}].
how could this really happen ? knowing that when I use the same method and assign it to the view , the objects are complete and
I mean this way :
public function listAction()
{
$this->view->assign('lists', $this->entrepriseRepository->findBypays(2));
}
More information about the TYPO3-project-typo3v4mvc
mailing list