Form field value set but saved as "null" in database
I have a form (order) where I am saving the company_id, from a select with a relationship "->relationship('company', 'name')". For some reason on create the field is saved as null in the database even if it's set as required. I tried to check if the data is passed through in the mutateFormDataBeforeCreate function, everything is fine but it still goes empty in the database. The interesting thing is that it is being saved normally after I edit the record, select it again and then save.
Any ideas what this could be?
Any ideas what this could be?