ManyToMany, Self-referencing, bidirectional

Hi guys,

Can anyone give an example of the right approach on using this in models ? For refrence: http://docs.doctrine-project.org/en/latest/reference/association-mapping.html#many-to-many-self-referencing