Update many-to-many tables