I’m wondering if below requirement is possible to implement in NHibernate / 
Win C#.

 

Database structure

-----------------------

*Table: ControllerInfo*

ControllerID (PK)

ControllerName

 

 

*Table: SupportedEvents*

EventID

EventName

ControllerID (FK)

 

Note: Supported events always 1 or more

 

I wanted to query, SaveOrUpdate ControllerInfo object from database 
including supported events list/collection.

 

Currently my application using NH v3.3.1. Is this possible with NHibernate? 
If so, plz provide sample modal / xml mapping example. 

 

//Modal class

-----------------

Class ControllerInfo

{

  Public Get Set ControllerID;

  Public Get Set ControllerName;

  IList<SupportedEvents> ControolerEvents = new List<SupportedEvents>();  
}

 

/ / DB mapping XML

---------------------------

<id name="Id" type="Int32" unsaved-value="0">

  <column name="ControllerID" sql-type="adInteger" not-null="false" unique="
true" index="ControllerID_PK"/>

 <generator class="increment" />

</id>

<property name="ControllerName" type=" String">

 <column name=" ControllerName" length="255" sql-type="adVarWChar" not-null=
"false"/>

</property>

How to setup mapping for list of events here???

 

-- 
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 http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to