Describe the bug
When entities with associations are used, for example many pupils to one school, it is not possible to administrate the entries with the association:
View - Association-column is not shown
Edit - Association can not be changed, because associations-field is not displayed
Create - Newly created entries fail to save because association can not be selected:
An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'school_id' cannot be null
To Reproduce
symfony new application --full
cd application
symfony console make:entity School
name, string, 255, no
symfony console make:entity Pupil
school, ManyToOne, School, no, yes, pupils, yes
firstname, string, 255, no
surname, string, 255, no
symfony console make:migration
symfony console doctrine:migrations:migrate
symfony composer req admin
symfony console make:admin:dashboard
symfony console make:admin:crud # App\Entity\School
symfony console make:admin:crud # App\Entity\Pupil
(OPTIONAL) Additional context
Associations in both directions have been correctly set by make:entity:
Describe the bug When entities with associations are used, for example many pupils to one school, it is not possible to administrate the entries with the association:
To Reproduce
(OPTIONAL) Additional context Associations in both directions have been correctly set by
make:entity
:src/Entity/School.php
src/Entity/Pupil.php