1

Possible Duplicate:
Hibernate - AnnotationConfiguration deprecated

In version 3.2 of Hibernate, I could configure hibernate and programmatically add the annotated classes through the Class AnnotationConfiguration.

But in a recent project, I am trying to use version 3.6, and just can not make it work.

Someone have a updated example for this?

thanks

Community
  • 1
  • 1
caarlos0
  • 20,020
  • 27
  • 85
  • 160

2 Answers2

1

You can use this new Configuration().addAnnotatedClass(annotatedClass)

mprabhat
  • 20,107
  • 7
  • 46
  • 63
0

In newer Hibernate versions, AnnotationConfiguration has been deprecated in favor of Configuration.

You can use the Configuration's

addAnnotatedClass(Object)

method with the same effect you had in 3.2 and below, as you can see in this post:

Hibernate - AnnotationConfiguration deprecated

Community
  • 1
  • 1
Nikola Yovchev
  • 9,498
  • 4
  • 46
  • 72