<?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="MediaFileTag"
            class="org.apache.roller.weblogger.pojos.MediaFileTag" access="PROPERTY">
        <table name="roller_mediafiletag"/>
        <named-query name="MediaFileTag.getByMediaFile">
            <query>SELECT w FROM MediaFileTag w WHERE w.mediaFile = ?1</query>
        </named-query>
        <attributes>
            <id name="id">
                <column name="id"/>
            </id>
            <basic name="name">
                <column name="name" insertable="true" updatable="true" unique="false" nullable="false"/>
            </basic>
            <many-to-one name="mediaFile" target-entity="org.apache.roller.weblogger.pojos.MediaFile">
                <join-column name="mediafile_id" insertable="true" updatable="true" nullable="false"/>
            </many-to-one>
        </attributes>
    </entity>
</entity-mappings>
