Tags group posts by topics. A tag contains several posts, and a post has several tags. This is a Many-To-Many bidirectional association. Doctrine manages transparently the association table needed to store Many-To-Many relations at the SQL level. The MySQL schema that will be generated is shown in the following screenshot:
Tag entity class has only two properties:
name: This is the name of the tag, it is unique, and is the identifier of the entity
posts: This is the collection of posts associated with this tag
The following are the steps to create the ...