Value inside FK field not getting inserted

I am following Shopware 6 developer training and their we made a foreign key relation with the County Entity.

This is my Migration file:

This is my Entity Definition:

This is my Entity:

This is my controller where i am trying to save the data:

 

_ country_id _ field in the database doesn’t get the value when the data is inserted via Insomnia API client. Even if i write this ‚random‘ instead of _ $countryId _ - it still doesn’t get the value and is always empty.

 

Any ideas what could be wrong?  Frown

Although the array _ $data _ does get the _ Id _ of the country in it, but it just doesn’t get set in the database field.

Any idea?

Why is this forum dead? Or there is no community support for English speakers ? 

Your property is wrong. It has to be countryId

I changed it but it was like that in video tutorial of developer training as well. But i changed that and still no country_id in table.

You still use in the generate country_id. It must be countryId

After changing it to countryId in generate method, now i am getting this error. I also changed in entity getter setter method from country_id to countryId and changed column name in table from country_id to countryId still same error. Reverted back entity and column name to country_id