Convert « HQL « JPA Q&A





1. Parse HQL to AST Structure and convert AST back to HQL    stackoverflow.com

I have a HQL query:

query = select item.itemNumber from items item where item.stock>0 and item.price<100.00
i like to parse this query and convert it into a tree structure:
AST queryTree = parse(query);
than i ...

2. Problem converting HQL to Linq-to-NHibernate    stackoverflow.com

How to convert this NHibernate HQL(works) ...

static IList<Phone> PhoneList()
{
    ISession session = OpenSession();

    IQuery query = session.CreateQuery("from Phone p where p.Kontact.ContactName = :_contact_name");
   ...

3. HQL converting problem    coderanch.com

this is my main class import java.util.Iterator; import org.hibernate.Query; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import org.hibernate.classic.Session; public class ViewQuery { public static void main(String[] args) { try { SessionFactory sessionfac = new Configuration().configure().buildSessionFactory(); Session session = sessionfac.openSession(); Person p1 = new Person(); String hql = "select person.id from Person person"; Query query = session.createQuery(hql); //int row = query.executeUpdate(); for (Iterator itor = ...

4. HQL with convert timezone    forum.hibernate.org