<?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 name="App\Entity\Tache" table="tache" repository-class="App\Entity\TacheRepository">
    <id name="id" type="integer" column="id" nullable="false">
      <generator strategy="AUTO"/>
    </id>
    <field name="nom" type="string" column="nom" nullable="false" length="255"/>
    <field name="description" type="text" nullable="true" column="description"/>
    <field name="duree" type="integer" nullable="false" column="duree"/>
    <many-to-one field="intitule" target-entity="Intitule" inversed-by="taches">
          <join-columns>
              <join-column name="intitule_id" referenced-column-name="id" nullable="true" />
          </join-columns>
    </many-to-one>
    <one-to-many field="tachesValidable" target-entity="TacheValidable" mapped-by="linkedTache">
        <cascade>
            <cascade-persist/>
            <cascade-remove/>
        </cascade>
    </one-to-many>
  </entity>
</doctrine-mapping>
