11<!--
2- <?xml version="1.0" encoding="utf-8" ? >
2+ <?xml version="1.0" encoding="utf-8" ?>
33<!DOCTYPE hibernate-mapping [ <!ENTITY BaseEntityProperties SYSTEM "..\BaseEntityProperties.xml"> ]>
44-->
5-
5+
66<hibernate-mapping xmlns =" urn:nhibernate-mapping-2.2" assembly =" BExIS.Dlm.Entities" namespace =" BExIS.Dlm.Entities.Data" >
77 <class xmlns =" urn:nhibernate-mapping-2.2" name =" Dataset" table =" Datasets" >
88 <!-- Mapping BaseEntity properties -->
99 <id name =" Id" type =" Int64" >
10- <column name =" Id" index =" idx_Datasets_id" />
10+ <column name =" Id" index =" idx_Datasets_id" />
1111 <generator class =" native" />
1212 </id >
1313
1616 <version name =" VersionNo" type =" Int32" >
1717 <column name =" VersionNo" />
1818 </version >
19-
19+
2020 <property name =" Extra" type =" System.Xml.XmlDocument, System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
2121 <column name =" Extra" not-null =" false" sql-type =" xml" />
2222 </property >
2828 <column name =" State" />
2929 </property >
3030 <property name =" Timestamp" type =" DateTime" >
31- <column name =" StateTimestamp" not-null =" false" />
31+ <column name =" StateTimestamp" not-null =" false" />
3232 </property >
3333 <property name =" Comment" type =" string" >
3434 <column name =" StateComment" />
3535 </property >
3636 </component >
3737
38- <component name =" CreationInfo" >
38+ <component name =" CreationInfo" >
3939 <property name =" ActionType" type =" Vaiona.Entities.Common.AuditActionType, Vaiona.Entities" >
4040 <column name =" C_ActionType" />
4141 </property >
4646 <column name =" C_Comment" />
4747 </property >
4848 <property name =" Timestamp" type =" DateTime" >
49- <column name =" C_Timestamp" not-null =" false" />
49+ <column name =" C_Timestamp" not-null =" false" />
5050 </property >
5151 </component >
5252
53- <component name =" ModificationInfo" >
53+ <component name =" ModificationInfo" >
5454 <property name =" ActionType" type =" Vaiona.Entities.Common.AuditActionType, Vaiona.Entities" >
5555 <column name =" M_ActionType" />
5656 </property >
6161 <column name =" M_Comment" />
6262 </property >
6363 <property name =" Timestamp" type =" DateTime" >
64- <column name =" M_Timestamp" not-null =" false" />
64+ <column name =" M_Timestamp" not-null =" false" />
6565 </property >
6666 </component >
67-
67+
6868 <!-- Mapping Dataset properties -->
6969
7070 <property name =" Status" type =" BExIS.Dlm.Entities.Data.DatasetStatus, BExIS.Dlm.Entities" >
71- <column name =" Status" index =" idx_ContentDescriptors_status" />
71+ <column name =" Status" index =" idx_ContentDescriptors_status" />
7272 </property >
73-
73+
7474 <property name =" LastCheckIOTimestamp" type =" Timestamp" >
7575 <column name =" LastCheckIOTimestamp" index =" idx_ContentDescriptors_lastCheckIOTimestamp" />
7676 </property >
77-
77+
7878 <property name =" CheckOutUser" type =" string" >
7979 <column name =" CheckOutUser" />
8080 </property >
81-
82- <!-- Mapping entity associations -->
83- <many-to-one name =" DataStructure" class =" BExIS.Dlm.Entities.DataStructure.DataStructure" not-null =" false" column =" DataStructureRef" />
8481
85- <many-to-one name =" MetadataStructure" class =" BExIS.Dlm.Entities.MetadataStructure.MetadataStructure" not-null =" false" column =" MetadataStructureRef" /> <!-- not-null should be true, when testing is finished-->
82+ <!-- Mapping entity associations -->
83+ <many-to-one name =" DataStructure" class =" BExIS.Dlm.Entities.DataStructure.DataStructure" not-null =" false" column =" DataStructureRef" />
8684
87- <many-to-one name =" ResearchPlan " class =" BExIS.Dlm.Entities.Administration.ResearchPlan " not-null =" false" column =" ResearchPlanRef " / >
85+ <many-to-one name =" MetadataStructure " class =" BExIS.Dlm.Entities.MetadataStructure.MetadataStructure " not-null =" false" column =" MetadataStructureRef " /> <!-- not-null should be true, when testing is finished -- >
8886
89- <many-to-one name =" EntityTemplate " class =" BExIS.Dlm.Entities.Data.EntityTemplate " not-null =" true " column =" EntityTemplateRef " />
87+ <many-to-one name =" ResearchPlan " class =" BExIS.Dlm.Entities.Administration.ResearchPlan " not-null =" false " column =" ResearchPlanRef " />
9088
89+ <many-to-one name =" EntityTemplate" class =" BExIS.Dlm.Entities.Data.EntityTemplate" not-null =" true" column =" EntityTemplateRef" />
9190
9291 <set name =" Versions" inverse =" true" lazy =" true" order-by =" Timestamp desc" cascade =" all-delete-orphan" >
9392 <key >
9796 </set >
9897
9998 <set name =" Views" inverse =" true" lazy =" true" cascade =" all" >
100- <key column =" DatasetRef" not-null =" false" foreign-key =" FK_Views_Datasets" />
99+ <key column =" DatasetRef" not-null =" false" foreign-key =" FK_Views_Datasets" />
101100 <one-to-many class =" BExIS.Dlm.Entities.DataStructure.DatasetView" />
102101 </set >
103-
104102 </class >
105103
106104 <sql-query name =" test1" >
107- <return alias =" dataset" class =" BExIS.Dlm.Entities.Data.Dataset" />
105+ <return alias =" dataset" class =" BExIS.Dlm.Entities.Data.Dataset" />
108106 select * from Datasets where xmlexists('$c/Metadata/Ownership[LastName= "Chamanara"]' passing Datasets.Metadata as "c")
109107 </sql-query >
110-
111108</hibernate-mapping >
0 commit comments