How to add a foreign key in Symfony?

I have some comments to post.
For lent I'm going to comments below using the method getComments. Comments do not need to posts.

How to create a link so that was the addition of a foreign key? And where better to do it in migration or separately in the entity Comments?
March 20th 20 at 11:42
1 answer
March 20th 20 at 11:44
To ospolzovat One-To-Many, and bidirectional type of communication. With the right settings, during the generation of the migration will create all required foreign keys.

Find more questions by tags Symfony