• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Any innate limitations to HQL vs. SQL?

Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody. I'm just starting to take a look at Hibernate and it's query language, and wondered if there are any innate limitations to the object-oriented queries versus standard SQL. I've seen some simpler ORMs lacking various capabilities such as left joins (I think it was a python one), but I haven't come across anything that HQL can't do.

Performance isn't an issue, just the functions performed by the query.

Brian Manahan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've not yet run into anything that I couldn't resolve.

In the worst case you can get a reference to Hibernate's JDBC Connection object and run SQL the old fashioned way.

I did that once when I had a very complex and long running query. By creating my own Statement and using Hibernate's Connection I was able to hand tune the query to eliminate several joins which dramatically improved performance.
Liar, liar, pants on fire! refreshing plug:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic