php - symfony entities many to many, i add new fields

Solution:

Is your field $tipoinvitado disappear? You might have changed your relation and the null boolean of $tipoinvitado at some point. You made your migration after changing any relation?

This can happen when you change your relations and had already data stored in you DB in a field that disappear because of you relation change.

I might be able to help you, don't hesitate giving more info

Answer

Solution:

You have the answer in the error, the $tipoinvitado field has the annotation nullable=false which is a not null constraint (prevent storing null value), so it should absolutely have a value. So you either give it a default value, give a value or change it to nullable=true.

Source