| 
					
						 <?xml version="1.0" encoding="utf-8" ?>
 <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" default-access="nosetter.camelcase">
 <class name="QandADomainModel.QandAAuthenticationQuestion, QandADomainModel" table="QA_AUTHENTICATION_QUESTIONS" >
 <id name="Id" column="QUESTION_ID" type="Int32" unsaved-value="0">
 <generator class="native"/>
 </id>
 <property name="Text" column="TEXT" type="string" not-null="true" />
 <property name="QuesLanguage" column="QUES_LANGUAGE" type="string" not-null="true" />
 <property name="CreatedDate" column="CREATION_DATE" type="DateTime" not-null="true" />
 <many-to-one name="QAClientApp" column="QA_CLIENT_APP_ID" class="QandADomainModel.QandAClientApplication, QandADomainModel" not-null="true" />
 <property name="Status" column="STATUS" type="string" not-null="true" />
 <bag name="QAAuthAnswers" lazy="false"  inverse="false" cascade="all-delete-orphan" >
 	<key column="QUESTION_ID"/>
 	<one-to-many class="QandADomainModel.QandAAuthenticationAnswer, QandADomainModel"/>
 </bag>
 <bag name="QAUsers" table="QA_QUESTIONS_USERS" inverse="false"  >
       <key column="QUESTION_ID" />
       <many-to-many  column="USER_ID" class="QandADomainModel.QandAUser,QandADomainModel"  />
 </bag> 
 </class>
 
 <class name="QandADomainModel.QandAUser, QandADomainModel" table="QA_USERS">
     <id name="Id" type="Int32" column="USER_ID">
       <generator class="native" />
     </id>
      <bag name="QAAuthenticationQuestions"   table="QA_QUESTIONS_USERS" lazy="true" inverse="true" >
       <key column="USER_ID" />
       <many-to-many column="QUESTION_ID"  class="QandADomainModel.QandAAuthenticationQuestion,QandADomainModel"  />
     </bag> 
      <property name="UserName" column="USER_NAME" type="String" />
     <property name="CreationDate" column="CREATION_DATE" type="DateTime" />
     <property name="Status" column="STATUS" type="String" />
     <many-to-one name="QAClientApplication" column="CLIENT_APP_ID" class="QandADomainModel.QandAClientApplication, QandADomainModel" />
   </class>
 
 <class name="QandADomainModel.QandAClientApplication,QandADomainModel" table="QA_CLIENT_APPLICATIONS"   >
 <id name="Id" column="QA_CLIENT_APP_ID" type="Int32" unsaved-value="0" >
 <generator class="native"/>
 </id>
 
 <property name="QAClientApplication" column="QA_CLIENT_APPLICATION_NAME" type="string" not-null="true" unique="true" />
 <property name="KeyName" column="KEY_NAME" type="string" not-null="true" unique="true" />
 <property name="CreatedDate" column="CREATION_DATE"  type="DateTime" not-null="true" />
 <property name="Status" column="STATUS"  not-null="true" />
 <bag name="QAAuthQuestions"  lazy="false" inverse="true" cascade="all-delete-orphan" >
 	<key column="QA_CLIENT_APP_ID"/>
 	<one-to-many class="QandADomainModel.QandAAuthenticationQuestion,QandADomainModel"/>
 </bag>
 </class>
 
 <class name="QandADomainModel.QandAAuthenticationAnswer, QandADomainModel" table="QA_AUTHENTICATION_ANSWERS" >
 <id name="Id" column="ANSWER_ID" type="Int32" unsaved-value="0">
 <generator class="native"/>
 </id>
 <property name="Text" column="TEXT" type="string" not-null="true" />
 <many-to-one name="User" column="USER_ID" class="QandADomainModel.QandAUser, QandADomainModel" not-null="true" />
 <many-to-one name="QAAuthQuestion" column="QUESTION_ID" class="QandADomainModel.QandAAuthenticationQuestion, QandADomainModel" not-null="true" />
 <many-to-one name="QAClientApp" column="QA_CLIENT_APP_ID" class="QandADomainModel.QandAClientApplication, QandADomainModel" not-null="true" />
 <property name="Status" column="STATUS" type="string" not-null="true" />
 <property name="CreatedDate" column="CREATION_DATE" type="DateTime"  />
 <property name="LastModifiedDate" column="LAST_MODIFICATION_DATE" type="DateTime"/>
 </class>
 </hibernate-mapping> 
					
  
						
					 |