add subselect fetching on many-to-many relation