Where can I find Doctrin...

About symfony tutorials, symfony book and API documentation.

Where can I find Doctrin...

Postby arash89 » Mon Aug 12, 2013 10:03 am

Hi Dear friends .
I'm new in Symfony and also newer in Doctrine.
In the Book of Symfony I learned How to get a row of my table with "repository" class.
but if the find method return more than one record how can I go to next ?
I mean:

$varName="NameOfManyProducts";
$doctrinOBJ = $this->getDoctrine();
$repositoryOBJ = $doctrinOBJ ->getRepository('AcmeStoreBundle:Product');
$rowsOBJ = $repositoryOBJ->findByName($varName);

I can access the first record with
$recordString=$rowsOBJ->getEntity1().$rowsOBJ->getEntity2().$rowsOBJ->getEntity3();
How can I fetch next record of the "$rowsOBJ"


Where can I find a Reference of Methods and Properties of Doctrine because I cant find any , about Repository Class or Manager Class
arash89
Junior Member
 
Posts: 10
Joined: Thu Jul 18, 2013 3:45 pm

Re: Where can I find Doctrin...

Postby arash89 » Tue Aug 13, 2013 7:10 am

I Find that "Repository.findByName()" method will return an Array. Then we can go to next record like an Array it is enough to increase the number of Array's Index. like below.
$i++;
$rowOBJ[$i]->getEntity1();
$rowOBJ[$i]->getEntity2();
...
$rowOBJ[$i]->getEntityN();

but I don't know yet where can I found a good Reference for Doctrine class members.
I cant find any Repository class or Manager class in the http://www.doctrine-project.org/
Was my question so silly that it has 40s view but no any answer or it is so difficult ?
arash89
Junior Member
 
Posts: 10
Joined: Thu Jul 18, 2013 3:45 pm


Return to Documentation

Who is online

Users browsing this forum: No registered users and 2 guests