solving issue with manyToMany relations