In a project which I work on I don't use Spring, I use Hibernate only. I don't want to use hbm.xml files for entity mappings/descriptions/etc. I want to use annotations only.
How do I tell Hibernate to load all Entity/Table
annotated classes from certain package(s)?
I searched on the web but I have no luck. Also I don't find information about the latest Hibernate version (mostly outdated articles/posts/etc.).
Edit 1:
http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html_single/#mapping
The hibernate doc page says this:
Object/relational mappings can be defined in three approaches:
1) using Java 5 annotations (via the Java Persistence 2 annotations)
2) using JPA 2 XML deployment descriptors (described in chapter XXX)
3) using the Hibernate legacy XML files approach known as hbm.xml
So that's it, I just want to use 1) with the SessionFactory/Session Hibernate API.
Edit 2:
Even though my questions was marked as duplicate, it's not, because I don't want to use JPA (and the implied descriptors) but just approach 1) from those listed above.