• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate; Making life easier.

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi @all,

I have been using hibernate for a few months now and i am not satisfied with it. Hibernate should make life easier but i have experienced some major drawbacks when using hibernate. As a start, configuring hibernate can be a pain in the ass. I lost about a week just to get it all setup and running like i needed to. Hibernate is also trying to reinvent the wheel. It even uses its own HQL. Why not use plain SQL? And Hibernate Annotations makes code messy, large and less readable. So is this the best we can do? I think there will be better techniques, maybe withing a reasonable amount of time, that will really do way better than hibernate. There must be.

So how do you guys experience hibernate. Do you like it or not?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


It even uses its own HQL. Why not use plain SQL?


Because there is no such thing as "plain SQL". ANSI 92 SQL is the closest thing we have to a cross platform standard and it is variously implemented accross all databases. Some database implement some of it, others all, some implement it all but prefer their own varient. HQL is so close to SQL in syntax that I find it pretty easy to switch between the two.


And Hibernate Annotations makes code messy, large and less readable.


If you are not a not a fan of annotation, why use them?

I like Hibernate. OK its not perfect, but I can remember the days when a decent Java ORM didn't exist. Not good times.
 
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

It's sad to hear about your bad experience with hibernate, I have to say it has been a lot of help for me as it takes away a lot of the mundane tasks of going through resultsets creating entities from the data. I tend to generate the entities from the database tables using either the JPA function from Eclipse or using Hibernate Tools. I don't usually use HQL for the querys (I think the reason they use it is because it is not database specific - unlike SQL) however if you want to use SQL hibernate will not stop you. I tend to use the Criteria interface for searching.

I haven't really used any other ORMs so I would also be interested if people had other opinions, but for what I have used it for, Hibernate has done its job so far.

Sean
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic