Closed hayusama closed 7 years ago
Hey hayusama.
Thank you for posting. I suggest you use stack-overflow (use the tag pomm
) for this kind of requests so github would remain a reference for Pomm’s tickets, and people having the same problem as you will easily find the answer. Thank you.
Hi Gregoire,
Thanks you for your reply. My topic http://stackoverflow.com/questions/43348538/pomm-twig-and-relation
Hi,
For a project i use your bundle. It's perfect for generate entity with a existing database. But i have a noob question ahah:
In my controller
$catalogues = $this->get('pomm')['my_db1'] ->getModel('\AppBundle\Entity\MyDb1\PublicSchema\CatalogueModel') ->findAll() ; return $this->render('SiteBundle:Default:homePage.html.twig',array('catalogues'=>$catalogues));
But in my view (twig) How to access the variable ??
{% for catalogue in catalogues %} {{dump(catalogue)}} --> value inside {% endfor %}
Result dump `Catalogue {#1132 ▼
container: array:13 [▼
] -status: 1 }`
catalogue.ID (not working) catalogue.container.ID (not working)
Other question : If my entity relation : in catalogue, WebActif --> relation with other table How to access Webactif because the dump returns only an ID, do I have to create my own method?
Sorry for my english.... -_-