Take a look at this: http://nhforge.org/doc/nh/en/index.html#components

On Mon, Oct 19, 2009 at 9:01 AM, alish <[email protected]> wrote:

>
> I need to write mapping file for below classes. Problem is, I have no
> table in database for Branch, just need an ıd for MAINBRANCHCODE
> field. My mappin document is as below. Error is "Could not find a
> getter for property 'Information.MainBranch.Id' in class
> 'PromissoryNotes.Server.Data.Bundle' "
>
> how should I wirte mappin document? please help?
>
> Classes:
>
> public class Bundle
>    {
>        public virtual BundleEntranceInformation Information { get;
> set; }
>    }
>
> public class BundleEntranceInformation
>    {
>        public virtual Branch MainBranch { get; set; }
>    }
>
> public class Branch
>    {
>        public virtual short Id { get; set; }
>    }
>
>
>
> hbm.xml file:
> <class name="PromissoryNotes.Server.Data.Bundle,
> PromissoryNotes.Server.Data" table="BUNDLE" lazy="true">
>    <id name="Id" column="ID" type="Decimal">
>      <generator class="increment" />
>    </id>
>    <property name="Information.MainBranch.Id" column="MAINBRANCHCODE"
> type="short"></property>
>  </class>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to