Re: hibernate + postgresql ? - Mailing list pgsql-general

From Oliver Kohll
Subject Re: hibernate + postgresql ?
Date
Msg-id F9D2E51D-B9FB-4360-A738-22C1F5444C40@gtwm.co.uk
Whole thread Raw
In response to hibernate + postgresql ?  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-general
Begin forwarded message:


On Nov 29, 2007 8:52 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
Oleg Bartunov wrote:
> Hello,
>
> any exprerience with Hibernate + PostgreSQL ? How does this combination
> is flexible and smart ? Is't possible to tune selected queries ?

In short, it sucks :).

Long description: Hibernate is a mature ORM for Java. It is in use with
PostgreSQL in quite a few installations and even a bunch that we are
responsible for. It does work as well as any ORM can work. 

The problem is, its an ORM and ORMs are dumb in there actual ability to
work with any real relational database.

If you are not lazy you can push outside the standard hibernate methods
and produce very usable code but then you have to wonder why you have 
hibernate there at all.


Sincerely,

Joshua D. Drake

Well ORM has its uses.

We use both Hibernate and raw SQL in the same application - SQL when we need fast querying on a database storing user data and Hibernate just to persist the state of the application to disk so it's saved between restarts. It's great not to have to manage this manually.

Hibernate is slow and the generated queries can be massive yes, but in our example the only time it gets any real use is as the app is booting up and restoring Java objects from the db. On the plus side, it produces a fairly easily understood schema that matches your objects so you're able to query the state of you app objects with SQL on the command line.

Regards

Oliver Kohll


pgsql-general by date:

Previous
From: Benoît Carpentier
Date:
Subject: free ETL using Postgresql 8.2.x
Next
From: Pedro Doria Meunier
Date:
Subject: Help needed optimizing query