Add ManyToMany.targetEntity handling #675