• Post Reply Bookmark Topic Watch Topic
  • New Topic


Franck McGeough
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?
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!