Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys ,


I am doing following .

C#
public static IList<ClsCompany > RetreiveAll()
       {
           IList<ClsCompany> Company = null;
           try
           {
               using (var Session = ClsNhiberateHelper.OpenSession())
               {
                   NHibernate.IQuery Query = Session.CreateQuery("from tblCompany tc order by tc.company ");
                   Company = Query.List<ClsCompany>();
                   return Company;                   
               }
           }
           catch (Exception ex)
           {
               throw new Exception(ex.Message);
           }
       }


And Getting followung exception

tblCompany is not mapped [ from tblCompany tc order by tc.company ]


Please help me Why i am getting This?
Posted

1 solution

Hibernate Query Language (HQL) is case sensitive. The entity name and propery name used in HQL must be in the same case in which they are specified in CFC. It is the common mistake while using HQL.

Could you verify in your code?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900