Re: Java persistence
On 28-09-2010 05:28, Arved Sandstrom wrote:
Arne Vajh?j wrote:
On 26-09-2010 08:15, Lew wrote:
On 09/26/2010 12:09 AM, Shiladitya wrote:
I am new to Java and need a simple, easy to use library to map Java
classes with MySQL tables. I came across Hibernate and Google
persist. Can you suggest pros and cons of these or suggest some
other better ORM ?
Similar to Hibernate are the Java Persistence API (JPA)
implementations EclipseLink and Apache OpenJPA. They're all three
robust and quite useful. Make sure if you do use Hibernate that you
stick with the JPA-compliant part of it.
I consider that very good advice.
Unfortunately it is not widely followed.
One reason it hasn't been widely followed is that with JPA 1.0 there were
important and interesting things that you couldn't do with JPA, but
Hibernate or EclipseLink (or presumably OpenJPA) did supply useful APIs to
do them. There should be considerably fewer reasons to dive into native API
land when using JPA 2.0 implementations.
My guess is that even for JPA 1.0 it was more laziness/ignorance
than need for specific features.
Arne