Traversing a database through a rich many to many relationship