Reda
Handle nullable relationship in edit form
I have "Project" and "HumanResource" models.
Each project has a "project manager" and "operational_manager", both belong to "HumanResource" model.
i can create a project without mentionning the project and operational managers.
In this case the "project_manager" and "operational_manager" will be null.
When i don't set those fields i get the error in attachment.
Otherwise, i pass normally.
EditRecord Code :
relationship code in Project model :
6 replies