posted 11 years ago
I have a complicated query that requires a UNION. createQuery doesn't support UNION in the current version of Hibernate so I thought I'd use createSQLQuery. What I want Hibernate to do is to replace my Java class names with the actual database tablenames, column names. I can do an addEntity call but that just maps the class that I'm selecting. I want it to parse the whole string. I noticed that there really isn't an example of this in the Hibernate unit tests - almost all the createSQLQuery tests are very simple one table selects. so I'm assuming that I'm just trying to make it do something that it can't. Is that correct?