Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

createSQLQuery

 
Franck McGeough
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic