0

I've used hibernate-tools-4.0.0-CR1.jar having some problems with informix (11.7) reverse engineering entities generation, I'd like to try earlier versions to see if that helps but documentation is not clear to me about JPA 2.0 compliant versions.

maven repository link: http://mvnrepository.com/artifact/org.hibernate/hibernate-tools

thanks in advance.

Eric Martinez
  • 406
  • 5
  • 16
  • 2
    JPA specs define *nothing* about "reverse engineering". Consequently no "tool" of that nature is "JPA compliant". JPA only defines persistence (JPA2.1 defines some schema generation too - the only thing covered) – DataNucleus Aug 28 '13 at 04:35
  • 1
    Hibernate itself does provide JPA compliance (as @DataNucleus indicates), but provides additional functionality over and above JPA. I would not expect a Hibernate reverse-engineering tool to limit itself to JPA functionality unless it had a specific documented option to do so. – Thierry Aug 28 '13 at 14:35
  • Maybe you have to dig into the [sources](https://github.com/hibernate/hibernate-tools) on GitHub ? Current version (head) is **4.0.0-CR1**. In lib/testlibs, there is **hibernate-jpa-2.0-api-1.0.1.Final.jar** – Guillaume Husta Jan 03 '14 at 14:56
  • A lot of JPA annotations are generated in the class **EntityPOJOClass** - [source](https://github.com/hibernate/hibernate-tools/blob/master/src/java/org/hibernate/tool/hbm2x/pojo/EntityPOJOClass.java)... but there don't seem to be changes since JPA 1.0. And no JPA 2.0 specific annotations. – Guillaume Husta Jan 03 '14 at 15:24

1 Answers1

1

I'm also studying the topic, and reaching some conclusions, but I am not an expert so I appreciate any correction

Hibernate is a JPA 2.0-compliant superset from version 3.5 on if I recall correctly. Latest 4.x versions are candidates for JPA compliance 2.1 from what I read.

Anyway, htere is a flag to configure it for ouputing JPA annotations alone (in the case of Hibernate Tools for Eclipse, you are asked in Launch configurations menu) and even add some EJB3 to the mix, for pure standard compliance

If you do the reverse-eng generation with the "Core" flag, it seems to map to cfg XMLs, if you use "Annotations", it outputs Hibernate's org.hibernate.* annotations, but with "JPA" you are entirely using javax.persistance.* ones, at least for those basic things as I checked so far.

Whimusical
  • 6,401
  • 11
  • 62
  • 105