<?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="WeblogBookmark"
            class="org.apache.roller.weblogger.pojos.WeblogBookmark" access="PROPERTY">
        <table name="bookmark"/>
        <named-query name="BookmarkData.getByFolder">
            <query>SELECT b FROM WeblogBookmark b WHERE b.folder = ?1 order by b.priority</query>
        </named-query>
        <attributes>
            <id name="id">
                <column name="id"/>
            </id>
            <basic name="name">
                <column name="name" insertable="true" updatable="true" unique="false"/>
            </basic>
            <basic name="description">
                <column name="description" insertable="true" updatable="true" unique="false"/>
            </basic>
            <basic name="url">
                <column name="url" insertable="true" updatable="true" unique="false"/>
            </basic>
            <basic name="priority">
                <column name="priority" insertable="true" updatable="true" unique="false"/>
            </basic>
            <basic name="image">
                <column name="image" insertable="true" updatable="true" unique="false"/>
            </basic>
            <basic name="feedUrl">
                <column name="feedurl" insertable="true" updatable="true" unique="false"/>
            </basic>
            <many-to-one name="folder" target-entity="org.apache.roller.weblogger.pojos.WeblogBookmarkFolder">
                <join-column name="folderid" insertable="true" updatable="true" />
                <cascade>
                    <cascade-persist />
                    <cascade-merge />
                    <cascade-refresh />
                </cascade>
            </many-to-one>            
            <transient name="website"/>
        </attributes>
    </entity>
</entity-mappings>
