0

I'm using hibernate tools under Eclipse Indigo. The Hibernate Console has Annotations option selected and hibernate version is 4.0.

The hibernate tools wizard generates annotations only when I choose Generate EJB3 Annotations option. This introduces a dependency on EJB, and I don't want it.

How do I convince Hibernate tools to generate POJOs (via reverse engineering) that uses plain (non jpa) hibernate annotations?

mahonya
  • 9,247
  • 7
  • 39
  • 68

1 Answers1

0

Then you probably want to specify "Hibernate 3.x" as version, not 4.0. If I remember correctly, Hibernate 4.0 provides JPA-only annotations, plus some few extra ones that would be "extensions".

Now, I think the real question is: why do you want to get rid of JPA? Note that EJB3 != JPA. In fact, JPA is a replacement for what was once known as EJB Entity Beans. And that adding JPA dependency will not add an EJB dependency in your project.

jpkroehling
  • 13,881
  • 1
  • 37
  • 39
  • I don't want to get rid of JPA. I want to use JPA, but with Hibernate Tools, my DAO classes are generated with @Stateless annotation, with an unresolved import javax.ejb.Stateless; How do I make hibernate tools give me JPA with Hibernate 4? – mahonya May 09 '12 at 10:34