<?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 http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
  <entity repository-class="App\Entity\IntituleValidableRepository" name="App\Entity\IntituleValidable">
    <id name="id" type="integer" column="id">
      <generator strategy="AUTO"/>
    </id>
    <field name="valide" type="boolean" column="valide"/>

    <many-to-one field="linkedIntitule" target-entity="App\Entity\Intitule" inversed-by="intitulesValidable" fetch="LAZY" >
      <join-columns>
        <join-column name="linked_intitule_id" referenced-column-name="id" nullable="false"/>
      </join-columns>
    </many-to-one>
    <many-to-one field="demande" target-entity="App\Entity\Demande" inversed-by="intitulesValidable" fetch="LAZY" >
      <join-columns>
        <join-column name="demande_id" referenced-column-name="id" nullable="false"/>
      </join-columns>
    </many-to-one>
    <one-to-many field="tachesValidable" target-entity="TacheValidable" mapped-by="intituleValidable">
        <cascade>
            <cascade-persist/>
            <cascade-remove/>
        </cascade>
    </one-to-many>
  </entity>
</doctrine-mapping>
