Загрузка...

Symfony 5 : Inheritance Mapping / Polymorphic relationship? (Example)

Documentation: https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/reference/inheritance-mapping.html

This video answers (hopefully) a question that a viewer was asking, How can i use the same comments entity with different other entities using a single relationship, this is where a polymorphic relationship is used, and in the case of Symfony or Doctrine we use what's called inheritance mapping.

This video does the following:
- Create A Comment, Post, Video and parent entity called Comment.
- Setup the inheritance type and identifiers for the targets.
- Create a comments for both Post and Video and fetching them.

Github repository: https://github.com/konshensx16/doctrine_polymorphic_association_example/

If you have any question please leave them down in the comments below, i will do my best and try to answer them.

Видео Symfony 5 : Inheritance Mapping / Polymorphic relationship? (Example) канала OverSeas Media
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять