I have a configuration with JPA. Everything is fine and working.
When i use JPA syntax like this :
EntityManagerFactory emf = Persistence.createEntityManagerFactory("pmanager");
EntityManager em = emf.createEntityManager();
Query q = em.createQuery("from foo");
List l = q.getResultList();
OK! - Works.
But how do i have to do use Hibernate criteria, Query ?
How do i get a Hibernate Session Object ?
Or is this general a wrong approach ?
The reason for doing this is, that i like the annotaion concept from JPA,
but i want to use the power from HQL.
thanks for a code snippet
olaf
|