Boucle sur entité d'une relation M2O
Bonsoir,
voici mon entité:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <?php
namespace SB\PrestaBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Forfait
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="SB\PrestaBundle\Entity\ForfaitRepository")
*/
class Forfait
{
/**
* @ORM\ManyToOne(targetEntity="SB\PrestaBundle\Entity\Prestacateg")
* @ORM\JoinColumn(nullable=false)
*/
private $prestacateg; |
je voudrais faire une boucle sur mon entité prestacateg et lister les entité forfait qui sont liée avec.