I am using QueryDSL-JPA on JBoss and want at one point select an entity from a different table than the one I am normally using and annotating via @Table. I do not want to create a separate Java class since in the end, it should return me the same class I am using.
Any idea on how to achieve this? Alternatively via the EntityManager or QueryDSL-SQL or Hiberate. Using this approach for accessing historic tables should not be so uncommon...