I have two classes - Page and SiteVersion, which have a many to many relationship. Only SiteVersion is aware of the relationship (because the site is modular and I want to b
I think you need to select the SiteVersion in your query too:
SELECT v, p FROM SiteVersion v JOIN v.pages p WHERE v.id = 5 AND p.slug='index'
You will get an array of SiteVersion entities which you can loop through to get the Page entities.