I\'m wondering what\'s the best, the cleanest and the most simply way to work with many-to-many relations in Doctrine2.
Let\'s assume that we\'ve got an album like
What you are referring to is metadata, data about data. I had this same issue for the project I am currently working on and had to spend some time trying to figure it out. It's too much information to post here, but below are two links you may find useful. They do reference the Symfony framework, but are based on the Doctrine ORM.
http://melikedev.com/2010/04/06/symfony-saving-metadata-during-form-save-sort-ids/
http://melikedev.com/2009/12/09/symfony-w-doctrine-saving-many-to-many-mm-relationships/
Good luck, and nice Metallica references!