Thanks for your response.
public virtual IList<wmis_service_detail> ServiceDetails { get; set; }
 public virtual wmis_service_master ServiceDet { get; set; }
After adding above in the class it works fine. Do I need to do anything 
else?


On Thursday, December 28, 2017 at 11:49:51 PM UTC+8, Gunnar Liljas wrote:
>
> And the error?
>
> 2017-12-28 16:28 GMT+01:00 Siva Prasad Nath <[email protected] 
> <javascript:>>:
>
>> Below is my .hbm.ml file contents.
>> wmis_service_master is parent table. other one is child table.Child table 
>> has composite key(id+ctr).
>>
>> <?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_service_master" table="wmis_service_master" >
>>     <cache usage="read-write" />
>>     <id name="sm_id" column="sm_id" type="Int32">
>>       <generator class="native" />
>>     </id>
>>     <property name="sm_svc_date" />
>>     <property name="sm_veh_num" />
>>     <property name="sm_svc_type" />
>>     <property name="sm_client_id" />
>>     <property name="sm_client_type" />
>>     <property name="sm_author" />
>>     <property name="sm_creation_date" />
>>     <property name="sm_oil" />
>>     <property name="sm_mileage" />
>>     <set name="ServiceDetails"  cascade="all" inverse="true">
>>       <key column="sm_id"/>
>>       <one-to-many class="wmis_service_detail"/>
>>     </set>
>>
>>   </class>
>>   <class name="wmis_service_detail" table="wmis_service_detail" >
>>     <cache usage="read-write" />
>>     <id name="sd_svc_ctr" column="sd_svc_ctr" type="Int32">
>>       <generator class="native" />
>>     </id>
>>     <property name="sd_svc_required" />
>>     <many-to-one name="ServiceDet" class="wmis_service_master" 
>> column="sd_svc_no" />
>>   </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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/nhusers.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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