Same issue faced here with similar sincere,
select new User(id, userId, nin, jobId, name, mobile, email, recordActivity) from User o inner join o.roles r where r.id = '4'
Any comments from hibernate team on this?