]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResult.hbm.xml
Add license headers
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.hibernate / src / main / resources / org / argeo / slc / hibernate / test / tree / TreeTestResult.hbm.xml
index 5397a64bd6ae239bc1a9707474805b503834ac30..c404cc54c4555e06ec1173fe58f7dd25145cc78c 100644 (file)
@@ -1,4 +1,22 @@
 <?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+\r
 <!DOCTYPE hibernate-mapping PUBLIC\r
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
                <cache usage="read-write" />\r
                <id name="uuid" column="UUID" />\r
 \r
-               <property name="closeDate" column="CLOSE_DATE" type="timestamp"
+               <property name="closeDate" column="CLOSE_DATE" type="timestamp"\r
                        not-null="false" />
 
-               <map name="attributes" table="TTR_ATTRS_MAP" cascade="all"
-                       lazy="false" sort="natural">
+               <map name="attributes" table="TTR_ATTRS_MAP" cascade="all" lazy="false"
+                       sort="natural">
                        <cache usage="read-write" />
                        <key column="PARENT_ID" />
                        <map-key column="ATTR_NAME" type="string" />
@@ -22,8 +40,7 @@
                        sort="natural">
                        <cache usage="nonstrict-read-write" />
                        <key column="PARENT_ID" />
-                       <composite-map-key
-                               class="org.argeo.slc.core.structure.tree.TreeSPath">
+                       <composite-map-key class="org.argeo.slc.core.structure.tree.TreeSPath">
                                <key-property name="asUniqueString" column="PATH" />
                        </composite-map-key>
                        <many-to-many class="PartSubList" column="PART_SUB_LIST_ID"
                        sort="natural">
                        <cache usage="nonstrict-read-write" />
                        <key column="PARENT_ID" />
-                       <composite-map-key
-                               class="org.argeo.slc.core.structure.tree.TreeSPath">
+                       <composite-map-key class="org.argeo.slc.core.structure.tree.TreeSPath">
                                <key-property name="asUniqueString" column="PATH" />
                        </composite-map-key>
-                       <many-to-many
-                               class="org.argeo.slc.core.structure.SimpleSElement"
+                       <many-to-many class="org.argeo.slc.core.structure.SimpleSElement"
                                column="ELEMENT_ID" unique="true" />
                </map>
+
+               <list name="attachments" table="RESULTS_ATTACHMENTS" cascade="all">
+                       <cache usage="nonstrict-read-write" />
+                       <key column="RESULT_ATTACHMENT_ID" />
+                       <list-index column="INDX" />
+                       <many-to-many class="org.argeo.slc.core.attachment.SimpleAttachment"
+                               column="ATTACHMENT_ID" unique="true" />
+               </list>
        </class>
 </hibernate-mapping>
\ No newline at end of file