-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: undefined alias or unknown mapping
PostPosted: Wed Mar 15, 2006 4:16 pm 
Newbie

Joined: Tue Mar 14, 2006 5:32 am
Posts: 12
Location: South Africa
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.