Hi,
I have 2 tables that is used for lookup. A table called order use these two tables to do lookups. I map the two tables one-one mapping with order. However, when i try to do a HQL query, i seem to be getting an error.
below is the xml mapping file for the 3 files. thanks
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="Nhg.Aurora.Plato.Business.Common.Entity.Lab.OrderCategoryType, Nhg.Aurora.Plato.Business.Common" table="AUR_ORDER_CATEGORY_TYPE" lazy="true" >
<id name="AurId" column="AUR_ID" access="nosetter.camelcase">
<generator class="native"/>
</id>
<property name="CategoryCode" column="ORDER_CATEGORY_CODE"></property>
<property name="CategoryName" column="ORDER_CATEGORY_NAME"></property>
<one-to-one name="Order" class="Nhg.Aurora.Plato.Business.Common.Entity.Lab.Orders,Nhg.Aurora.Plato.Business.Common" property-ref="OrderCategoryType" cascade="none" />
</class>
</hibernate-mapping>
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="Nhg.Aurora.Plato.Business.Common.Entity.Lab.OrderItemType, Nhg.Aurora.Plato.Business.Common" table="AUR_ORDER_ITEM_TYPE" lazy="true" >
<id name="AurId" column="AUR_ID" access="nosetter.camelcase">
<generator class="native"/>
</id>
<property name="OrderItemCode" column="ORDER_ITEM_CODE"></property>
<property name="OrderItemName" column="ORDER_ITEM_NAME"></property>
<one-to-one name="Order" class="Nhg.Aurora.Plato.Business.Common.Entity.Lab.Orders,Nhg.Aurora.Plato.Business.Common" property-ref="OrderItemType" cascade="none" />
</class>
</hibernate-mapping>
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="Nhg.Aurora.Plato.Business.Common.Entity.Lab.Orders,Nhg.Aurora.Plato.Business.Common" table="AUR_ORDER" lazy="true" >
<id name="AurId" column="AUR_ID" access="nosetter.camelcase">
<generator class="native"/>
</id>
<many-to-one name="OrderItemType" class="Nhg.Aurora.Plato.Business.Common.Entity.Lab.OrderItemType, Nhg.Aurora.Plato.Business.Common" column="ORDERITEMCODEID" unique="true" />
<many-to-one name="OrderCategoryType" class="Nhg.Aurora.Plato.Business.Common.Entity.Lab.OrderCategoryType, Nhg.Aurora.Plato.Business.Common" column="ORDERCATEGORYTYPEID" unique="true"/>
</class>
</hibernate-mapping>
|