rebuilding head
[mir.git] / source / mir / core / model / Comment.hbm.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE hibernate-mapping PUBLIC
3     "-//Hibernate/Hibernate Mapping DTD//EN"
4     "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
5     
6 <hibernate-mapping>
7
8 <!-- 
9     Created by Middlegen Hibernate plugin
10
11     http://boss.bekk.no/boss/middlegen/
12     http://hibernate.sourceforge.net/
13 -->
14
15 <class 
16     name="mir.core.model.Comment" 
17     table="comment"
18     proxy="mir.core.model.IComment"
19 >
20     <id
21         name="id"
22         type="int"
23         column="id"
24         unsaved-value="0"
25     >
26         <generator class="sequence">
27                 <param name="sequence">comment_id_seq</param> 
28         </generator>
29     </id>
30
31     <property
32         name="title"
33         type="java.lang.String"
34         column="title"
35         not-null="true"
36         length="255"
37     />
38     <property
39         name="creator"
40         type="java.lang.String"
41         column="creator"
42         not-null="true"
43         length="80"
44     />
45     <property
46         name="description"
47         type="java.lang.String"
48         column="description"
49         not-null="true"
50         sql-type="text" 
51     />
52
53     <property
54         name="mainUrl"
55         type="java.lang.String"
56         column="main_url"
57         length="255"
58     />
59     <property
60         name="email"
61         type="java.lang.String"
62         column="email"
63         length="80"
64     />
65     <property
66         name="address"
67         type="java.lang.String"
68         column="address"
69         length="80"
70     />
71     <property
72         name="phone"
73         type="java.lang.String"
74         column="phone"
75         length="20"
76     />
77
78     <property
79         name="webdbCreate"
80         type="java.sql.Timestamp"
81         column="webdb_create"
82         not-null="true"
83         length="8"
84     />
85
86     <property
87         name="published"
88         type="boolean"
89         column="is_published"
90         not-null="true"
91         length="1"
92     />
93
94     <property
95         name="checksum"
96         type="int"
97         column="checksum"
98         length="4"
99     />
100
101     <property
102         name="html"
103         type="boolean"
104         column="is_html"
105         not-null="true"
106         length="1"
107     />
108
109     <!-- associations -->
110    
111     <many-to-one
112         name="language"
113         class="mir.core.model.Language"
114         column="to_language"
115     />
116
117     <!-- dont know why but with Media it does not work -->
118     <many-to-one
119         name="media"
120         class="mir.core.model.Content"
121         column="to_media"
122     />
123
124     <many-to-one
125         name="commentStatus"
126         class="mir.core.model.CommentStatus"
127         column="to_comment_status"
128     />    
129
130 </class>
131 </hibernate-mapping>