Use regular join
instead of join fetch
(by the way, it’s inner
by default):
String hql = " select ec.id as entityChangeId, r.id as revisionId from EntityChange as ec " +
" join ec.revision as r " + ...
As error message tells you, join fetch
doesn’t make sense here, because it’s a performance hint that forces eager loading of collection.