Fix generic when the ManyToMany object not existed already