holger (1) [Avatar] Offline
#1
I think there are a lot of (older) projects which started with the native Hibernate API and native XML mappings.Now, it's the question of how to migrate to JPA 2.1 without pain.

What would be really useful is a Hibernate to JPA 2 migration guide both at the API, query and mapping level.
Does the book provide guidance for such a migration path?

For example, is it possible to use the native/proprietary Hibernate XML Mapping files with JPA 2 at the API level assuming Hibernate as persistence provider?

Will the book outline features of Hibernate that are not yet available in JPA? (custom collection types come to my mind)
Christian Bauer (56) [Avatar] Offline
#2
Re: book usable as migration guide?
> I think there are a lot of (older) projects which
> started with the native Hibernate API and native XML
> mappings.Now, it's the question of how to migrate to
> JPA 2.1 without pain.

That's what the previous edition was about, every native Hibernate operation and mapping was shown next to its JPA alternative. In this edition we cut all the native Hibernate mappings and operations if there is a JPA equivalent.

> For example, is it possible to use the
> native/proprietary Hibernate XML Mapping files with
> JPA 2 at the API level assuming Hibernate as
> persistence provider?

Of course, Hibernate is fully backwards compatible and the Java Persistence API is a wrapper of the Hibernate API. Every JPA interface has an unwrap() to access the native API.

> Will the book outline features of Hibernate that are
> not yet available in JPA? (custom collection types
> come to my mind)

Yes, no.