Click here to Skip to main content
13,044,428 members (118,736 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi guys ,

I am doing following .

public static IList<ClsCompany > RetreiveAll()
           IList<ClsCompany> Company = null;
               using (var Session = ClsNhiberateHelper.OpenSession())
                   NHibernate.IQuery Query = Session.CreateQuery("from tblCompany tc order by ");
                   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 ]

Please help me Why i am getting This?
Posted 24-Mar-12 4:23am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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?

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 24 Mar 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100