I am using one to one relationship. When trying to retrieve data I am 
getting exception error;
"could not execute query\r\n[ SELECT this_.cm_id as cm1_1_0_, this_.cm_type 
as cm2_1_0_, this_.cm_title as cm3_1_0_, this_.cm_name as cm4_1_0_, 
this_.cm_email_id as cm5_1_0_, this_.cm_web_link as cm6_1_0_, 
this_.am_cm_id as am7_1_0_, this_.pm_cm_id as pm8_1_0_ FROM 
wmis_client_master this_ WHERE this_.cm_type = ?p0 ORDER BY this_.cm_name 
asc ]\r\n  
Name:cp0 - Value:1\r\n[SQL: SELECT this_.cm_id as cm1_1_0_, this_.cm_type 
as cm2_1_0_, this_.cm_title as cm3_1_0_, this_.cm_name as cm4_1_0_, 
this_.cm_email_id as cm5_1_0_, this_.cm_web_link as cm6_1_0_, 
this_.am_cm_id as am7_1_0_, this_.pm_cm_id as pm8_1_0_ FROM 
wmis_client_master this_ WHERE this_.cm_type = ?p0 
ORDER BY this_.cm_name asc]"}

Mapping:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping assembly="wmis.app" namespace="wmis.app.Models" 
xmlns="urn:nhibernate-mapping-2.2">
  <class name="wmis_client_master" table="wmis_client_master"  lazy="true">
    <cache usage="read-write" />
    <id name="cm_id" column="cm_id" type="Int32">
      <generator class="native" />
    </id>
    <property name="cm_type" />
    <property name="cm_title" />
    <property name="cm_name" />
    <property name="cm_email_id" />
    <property name="cm_web_link" />
    <many-to-one name="Address" cascade="all" lazy="proxy" 
column="am_cm_id" unique="true" />
    <many-to-one name="Personal" cascade="all" lazy="proxy" 
column="pm_cm_id" unique="true" />
  </class>
  <class name="wmis_address_master" table="wmis_address_master" >
    <cache usage="read-write" />
    <id name="am_id" column="am_id" type="Int32">
      <generator class="native" />
    </id>
    <property name="am_cm_type" />
    <property name="am_cm_id" />
    <property name="am_address1" />
    <property name="am_address2" />
    <property name="am_building_name" />
    <property name="am_block_no" />
    <property name="am_unit_no" />
    <property name="am_street" />
    <property name="am_area" />
    <property name="am_zip" />
    <property name="tel1" />
    <property name="tel2" />
    <property name="fax" />
    <one-to-one name="client_master" constrained="true" 
property-ref="Address" />
  </class>
  <class name="wmis_personal_master" table="wmis_personal_master" >
    <cache usage="read-write" />
    <id name="pm_id" column="pm_id" type="Int32">
      <generator class="native" />
    </id>
    <property name="pm_cm_type" />
    <property name="pm_id" />
    <property name="pm_title" />
    <property name="pm_name" />
    <property name="pm_designation" />
    <property name="pm_tel_no1" />
    <property name="pm_tel_no2" />
    <property name="pm_hp" />
    <property name="pm_remarks" />
    <one-to-one name="client_master" constrained="true" 
property-ref="Personal"  />
  </class>
</hibernate-mapping>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to