<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings version="2.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
    <package>org.apache.roller.weblogger.pojos</package>
    <entity metadata-complete="true" name="WeblogBookmarkFolder" class="org.apache.roller.weblogger.pojos.WeblogBookmarkFolder"
            access="PROPERTY">
        <table name="bookmark_folder"/>
        <named-query name="WeblogBookmarkFolder.getByWebsite">
            <query>SELECT f FROM WeblogBookmarkFolder f WHERE f.weblog = ?1</query>
        </named-query>
        <named-query name="WeblogBookmarkFolder.getByWebsite&amp;Name">
            <query>SELECT f FROM WeblogBookmarkFolder f WHERE f.weblog = ?1 AND f.name = ?2</query>
        </named-query>
        <attributes>
            <id name="id">
                <column name="id"/>
            </id>
            <basic name="name">
                <column name="name" insertable="true" updatable="true" unique="false"/>
            </basic>
            <many-to-one name="weblog" target-entity="org.apache.roller.weblogger.pojos.Weblog">
                <join-column name="websiteid" insertable="true" updatable="true" nullable="false"/>
            </many-to-one>
            <one-to-many name="bookmarks" mapped-by="folder" target-entity="org.apache.roller.weblogger.pojos.WeblogBookmark" fetch="LAZY">
                <order-by>priority</order-by>
                <cascade>
                    <cascade-persist />
                    <cascade-remove />
                </cascade>
            </one-to-many>
        </attributes>
    </entity>
</entity-mappings>
