I'm using Hibernate with annotations (e.g. @Entity), and through the "Session" API (not JPA EntityManager).
Currently I manually add each Entity class:
Code:
sessionFactory= new Configuration()
.configure()
.addAnnotatedClass(Game.class) // where Game is an @Entity
.buildSessionFactory();
My question: can Hibernate scan the classpth to auto-detect all @Entities?
So that I don't need to write "addAnnotatedClass".
I searched the web, but only found documentation specific to JPA Entity Manager, or to Spring framework (neither is relevant in my case).
Thanks :)