But you guys deprecated criteria API of hibernate, I was Intent to use JPA criteria API which do not have this capability,
Actually We are migrating our existing system to Spring & Hibernate,
Criteria API of hibernate does have this capability in 5.1.16 version (since we are yet to move on JDK8 which will take another 1 year) now in that case if I use criteria API insted of JPA criteria API I will be end creating similar blockade for my code base where moving out of depricated API will create Lot of pain
On Other side JPA criteria API does lack in this regard
I have searched all these references but each and every of them only have predefined set of selection for they are not showing how to select fields dynamically
https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#criteria