createQuery « Map « JPA Q&A





1. Hibernate session.CreateQuery fails with tablename is not mapped    coderanch.com

Hello Everyone I am facing an issue with Hibernate mapping. I have the following code that tries to get all the Authors from the sql server table using the MS JDBC Driver. The code snippet looks like this Session session = sessionFactory.getCurrentSession(); Transaction tx = session.beginTransaction(); //error line Query query = session.createQuery("from Authors"); // List result = (List) query.list(); Here is ...

2. Bug at HQL to SQL mapping in createQuery?    forum.hibernate.org

hi, I have had weird problem creating a query with HQL. DEBUG - HQL: select myThing from MyClass where .. AND ( ( foo1 <> (:value1) AND foo1 < (:value2) ) OR ( foo1 = (:value1) AND foo2 < (:value3) ) ) maps to: DEBUG - SQL: select myThing as col_0_0_ from myclass_table where .. ...