Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:NHibernate version 1.0.2
Mapping documents:Mapping Document (minus a few similarly defined property tags to lessen the noise):
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="KSA.Gl.DataMapper.GlAccountRegister, KSA.Gl.DataMapper" table="ksaGlAccountRegister">
<id name="codeID" type="Int64" unsaved-value="0">
<column name="CodeID" sql-type="bigint" not-null="true" unique="true" index="PK_ksaGlAccountRegister"/>
<generator class="assigned" />
</id>
<version name="updatedOn" column="UpdatedOn" type="DateTime"/>
<property name="code" type="String">
<column name="Code" length="50" sql-type="varchar" not-null="true" index="IX_ksaGlAccountRegister_Code"/>
</property>
<property name="description" type="String">
<column name="Description" length="100" sql-type="varchar" not-null="true"/>
</property>
<property name="rowStateTypeID" type="Int32">
<column name="RowStateTypeID" sql-type="int" not-null="true"/>
</property>
<property name="updatedByCodeID" type="Int64">
<column name="UpdatedByCodeID" sql-type="bigint" not-null="true"/>
</property>
<property name="systemCodeID" type="Int64">
<column name="SystemCodeID" sql-type="bigint" not-null="true" index="IX_ksaGlAccountRegister_Code"/>
</property>
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:When I execute the Query using CreateQuery(hql) I get the following exception
{"undefined alias or unknown mapping: KSA [from KSA.Gl.DataMapper.GlAccountRegister WHERE SystemCodeID = :systemCodeID AND RowStateTypeID = :rowStateTypeID ORDER BY Code]" }
What I find particularly strange is that another table that I treat in the same way works fine, but all subsequent tables I've tried give me the above exception. I have compared everything I can find to establish a difference to no avail.
I have also tried using <hibernate-mapping auto-import="false"> without success.
Name and version of the database you are using: SQL