Dashboard > blojsom 3.0 > ... > Configuration Files > Blog.hbm.xml
  blojsom 3.0 Log In   View a printable version of the current page.  
  Blog.hbm.xml
Added by David Czarnecki, last edited by David Czarnecki on Jul 11, 2007  (view change)
Labels: 
(None)

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>

    <class name="org.blojsom.blog.database.DatabaseBlog" table="Blog" lazy="false">


        <id name="id">
            <column name="id" sql-type="integer" not-null="true" unique="true"/>
            <generator class="identity"/>
        </id>

        <property name="blogId">
            <column name="blog_id" sql-type="string" not-null="true" unique="true"/>
        </property>

        <map name="templates" table="Template" cascade="all" inverse="false" lazy="false">
            <key column="blog_id" not-null="true"/>
            <map-key column="template_flavor" type="string"/>
            <element column="template_value" type="string"/>
        </map>

        <map name="plugins" table="Plugin" cascade="all" inverse="false" lazy="false">
            <key column="blog_id" not-null="true"/>
            <map-key column="plugin_flavor" type="string"/>
            <element column="plugin_value" type="string"/>
        </map>

        <map name="properties" table="Properties" cascade="all" inverse="false" lazy="false">
            <key column="blog_id" not-null="true"/>
            <map-key column="property_name" type="string"/>
            <element column="property_value" type="text"/>
        </map>

    </class>

    <sql-query name="blog.id.list">
        select blog_id from Blog
    </sql-query>

</hibernate-mapping>

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators