The thing is your solution means we know in advance that the object A is going to be linked to an object B, C, etc. However, what I wanted to implement is a solution where we don't know in advance what are going to be the links and we have the possibility to create a new link between the object A and an object of a newly created class Z without changing anything in the classes A and Z. This way, if I take my previous example, you can properly have a Comment on any Object, without making straight relationships between the class Comment and the other classes.
And I think I found the solution to this problem:
What I've done is implementing a Listener, with the event postLoad which triggers each time an entity is loaded from Doctrine. On the other hand, my entities have for example an attribute $item which is the linked item for which we don't know the class yet.
In the postLoad event, we look in the database thanks to model_id and record_id what is the class of the linked item and return the object itself, and then we fill the $item attribute before the entity is returned by Doctrine. This way, each time we get an entity from Doctrine, the "fake" link between the entity and the item is built by the automatic event, and this works for every entity.
With the same principle, we can update the link with a postUpdate event which triggers each time we update the entity. It will update manually the "fake" link in the database.
For more information, I recommend to read these pages :