many-to-many relationships handled correctly