<class
name="mir.core.model.Content"
table="content"
+ proxy="mir.core.model.IContent"
>
<id
name="id"
type="int"
column="id"
+ unsaved-value="0"
>
- <generator class="sequence"/>
+ <generator class="sequence">
+ <param name="sequence">media_id_seq</param>
+ </generator>
</id>
<property
name="title"
type="java.lang.String"
column="title"
not-null="true"
- length="80"
+ length="255"
/>
<property
name="subtitle"
type="java.lang.String"
column="subtitle"
- length="30"
+ length="128"
/>
<property
name="edittitle"
type="java.lang.String"
column="edittitle"
- length="30"
+ length="128"
/>
<property
name="date"
name="description"
type="java.lang.String"
column="description"
- length="-1"
- />
- <property
- name="keywords"
- type="java.lang.String"
- column="keywords"
- length="-1"
+ sql-type="text"
/>
<property
name="comment"
type="java.lang.String"
column="comment"
- length="-1"
+ sql-type="text"
/>
<property
name="source"
length="255"
/>
<property
- name="isPublished"
+ name="published"
type="boolean"
column="is_published"
not-null="true"
length="1"
/>
<property
- name="isProduced"
+ name="produced"
type="boolean"
column="is_produced"
not-null="true"
length="8"
/>
<property
- name="isHtml"
+ name="html"
type="boolean"
column="is_html"
not-null="true"
name="contentData"
type="java.lang.String"
column="content_data"
- length="-1"
+ sql-type="text"
/>
<!-- associations -->
<many-to-one
class="mir.core.model.ArticleType"
column="to_article_type"
/>
- <many-to-one
- name="feature"
- class="mir.core.model.Feature"
- column="to_feature"
- />
+
<many-to-one
name="publisher"
class="mir.core.model.MirUser"
column="to_publisher"
/>
+
<many-to-one
name="language"
class="mir.core.model.Language"
column="to_language"
/>
+
<many-to-one
name="rights"
class="mir.core.model.Rights"
column="to_rights"
/>
+
+ <many-to-one name="parentContent"
+ class="mir.core.model.Content"
+ column="to_content"
+ cascade="none"
+ not-null="false"/>
+
<set
- name="childContent"
- inverse="true"
- cascade="all">
+ name="childContent"
+ table="content"
+ cascade="all"
+ inverse="true"
+ >
<key
column="to_content"
/>
class="mir.core.model.Content"
/>
</set>
- <many-to-one
- name="parentContent"
- class="mir.core.model.Content"
- column="to_content"
- />
- <set name="topics" table="content_x_topic">
+
+ <set name="comments" table="comment" lazy="true">
+ <key column="to_media"/>
+ <one-to-many class="mir.core.model.Comment"/>
+ </set>
+
+ <set name="topics" table="content_x_topic" lazy="true">
<key column="content_id"/>
<many-to-many column="topic_id" class="mir.core.model.Topic"/>
</set>
+
<set name="attachedMedias" table="content_x_media" lazy="true">
<key column="content_id"/>
<many-to-many column="media_id" class="mir.core.model.Media"/>