Fixed inheritance support for many to many batch fetching