<?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\KeywordRepository" name="Rapsys\BlogBundle\Entity\Keyword" table="keywords">
    <id name="id" type="integer" column="id">
      <generator strategy="IDENTITY"/>
    </id>
    <field name="created" type="datetime" column="created"/>
    <field name="updated" type="datetime" column="updated"/>
    <one-to-many field="keyword_translations" target-entity="Rapsys\BlogBundle\Entity\KeywordTranslation" mapped-by="keyword" fetch="LAZY"/>
    <many-to-many field="articles" target-entity="Rapsys\BlogBundle\Entity\Article" mapped-by="keywords" fetch="LAZY"/>
    <lifecycle-callbacks>
      <lifecycle-callback type="preUpdate" method="preUpdate"/>
    </lifecycle-callbacks>
  </entity>
</doctrine-mapping>
