Thursday, July 19, 2012

How to Debug nhibernate.hql.ast.antlr.querysyntaxexception?

How to Debug nhibernate.hql.ast.antlr.querysyntaxexception:

    This error may occur, when we have syntactical errors in the query when working with HQL. The following example explains how to resolve this issue.

You may get error, if you write as below:

select * from Employee;

(or)

select e.* from Employee e;

(or)

select from Employee;


Correct Syntax:

select e from Employee e;