yaragalla_murali wrote:
When you are using
Code:
CreateSQLQuery
you have to pass native sql query. you cannot pass HQL query.
yup i did that, i forgot to write the correct form here in fourm, thanks.
nordborg wrote:
There is an entire chapter in the documentation about native queries in the documentation which, among other things, will tell you how to return entities:
http://docs.jboss.org/hibernate/stable/ ... rysql.htmlI looked at it before i posted but will check it out again, thanks.
achyut wrote:
in the query you have to add the entity.
List Users = session.CreateSQLQuery("SELECT * FROM Users").addEntity(Users.class).list();
Thanks, i will give this a try.