symfony - Can't get any entity associated to a tree entity -


i'm working on e-learning application , have categorize courses. section entity 1 of tree extension. in order retrieve courses of section, made following assoication:

/**  * @orm\onetomany(targetentity="svi\formationbundle\entity\course", mappedby="section")  */ private $courses; 

the problem when try courses in twig doing {% if section.courses|length > 0 %}, receive error message

key "courses" array keys "id, titre, sommaire, slug, deactivated, lft, lvl, rgt, root, __children" not exist in sviformationbundle:formation:see_courses.html.twig @ line 22. 

i made dump on section object , displayed attributes except ones of onetomany , manytoone associations. please? isn't possible associate other entities tree entity? if how make nested classification in symfony? thanks.

in query, have explicitely add 'join' or 'leftjoin' 'course' entity.


Comments

Popular posts from this blog

java - Null response to php query in android, even though php works properly -

node.js - Using Node without global install -

php - CakePHP HttpSockets send array of paramms -