<?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" />
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