If you’re using such relations between your tables in database you’ll find useful the following article:

Many-to-Many Relationships with Propel