/** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\Column(type="string", length=100) */ protected $section_name; /** * @ORM\OneToMany(targetEntity="Category", mappedBy="section_id") */ protected $categories;
relacyjną do niej
/** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\Column(type="string", length=100) */ protected $category_name; /** * @ORM\ManyToOne(targetEntity="Section", inversedBy="categories") * @ORM\JoinColumn(name="section_id", referencedColumnName="id") */ protected $section;
gdy odwołuje się do pobranego rekordu z tabeli section i chcę wydobyć wszystkie kategorie, z którymi ta sekcja jest powiązania to otrzymuję
An exception has been thrown during the rendering of a template ("Notice: Undefined index: section_id in D:\server\www\magnetosfera\vendor\doctrine\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php line 1280") in ::base.html.twig at line 13.
dorzucam jeszcze odwołanie w szablonie twig