<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
  <entity repository-class="Rapsys\BlogBundle\Repository\KeywordTranslationRepository" name="Rapsys\BlogBundle\Entity\KeywordTranslation" table="keywords_translations">
    <unique-constraints>
      <unique-constraint name="locale_slug" columns="locale,slug"/>
    </unique-constraints>
    <id name="keyword_id" type="integer" column="keyword_id"/>
    <id name="locale" type="string" column="locale" length="5"/>
    <field name="description" type="text" column="description" nullable="true"/>
    <field name="slug" type="string" column="slug" length="128" nullable="true"/>
    <field name="title" type="string" column="title" length="128" nullable="true"/>
    <field name="created" type="datetime" column="created"/>
    <field name="updated" type="datetime" column="updated"/>
    <many-to-one field="keyword" target-entity="Rapsys\BlogBundle\Entity\Keyword" inversed-by="keyword_translations" fetch="LAZY">
      <join-columns>
        <join-column name="keyword_id" referenced-column-name="id" nullable="false"/>
      </join-columns>
    </many-to-one>
    <lifecycle-callbacks>
      <lifecycle-callback type="preUpdate" method="preUpdate"/>
    </lifecycle-callbacks>
  </entity>
</doctrine-mapping>
