Working assigning key groups to entrances
Helper methods to handle bi-directional ManyToMany relations changes.