Commit f0692b23 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Correction de financement en origine_financement

parent 344c1011
Loading
Loading
Loading
Loading
+6 −10
Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.OrigineFinancement.dcm.xml: 6 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
<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="Application\Entity\Db\Financement" table="FINANCEMENT"
    <entity name="Application\Entity\Db\OrigineFinancement" table="ORIGINE_FINANCEMENT"
            repository-class="">
        <id name="id" type="integer" column="ID">
            <generator strategy="SEQUENCE"/>
@@ -10,17 +10,13 @@

        <field name="code"              column="CODE"               type="string" length="64"       nullable="false" />
        <field name="libelle"           column="LIBELLE"            type="string" length="256"      nullable="false" />
        <field name="libelleCourt"      column="LIBELLE_COURT"      type="string" length="64"       nullable="false" />


        <many-to-many target-entity="Application\Entity\Db\These" field="theses">
            <join-table name="FINANCEMENT_THESE">
        <many-to-one field="source" target-entity="UnicaenImport\Entity\Db\Source">
            <join-columns>
                    <join-column name="FINANCEMENT_ID" referenced-column-name="ID"/>
                <join-column name="SOURCE_ID" referenced-column-name="ID"/>
            </join-columns>
                <inverse-join-columns>
                    <join-column name="THESE_ID" referenced-column-name="ID"/>
                </inverse-join-columns>
            </join-table>
        </many-to-many>
        </many-to-one>

    </entity>
</doctrine-mapping>
+22 −12
Changes for module/Application/src/Application/Entity/Db/OrigineFinancement.php: 22 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
namespace Application\Entity\Db;

use Doctrine\Common\Collections\ArrayCollection;
use UnicaenImport\Entity\Db\Source;

class Financement {

@@ -12,8 +13,10 @@ class Financement {
    private $code;
    /** @var string */
    private $libelle;
    /** @var ArrayCollection */
    private $theses;
    /** @var string */
    private $libelleCourt;
    /** @var Source */
    private $source;

    public function __construct()
    {
@@ -65,31 +68,38 @@ class Financement {
    }

    /**
     * @return ArrayCollection
     * @return string
     */
    public function getTheses()
    public function getLibelleCourt()
    {
        return $this->theses;
        return $this->libelleCourt;
    }

    /**
     * @param These $these
     * @param string $libelleCourt
     * @return Financement
     */
    public function addThese($these)
    public function setLibelleCourt($libelleCourt)
    {
        $this->theses[] = $these;
        $this->libelleCourt = $libelleCourt;
        return $this;
    }

    /**
     * @param These $these
     * @return Source
     */
    public function getSource()
    {
        return $this->source;
    }

    /**
     * @param Source $source
     * @return Financement
     */
    public function removeThese($these)
    public function setSource($source)
    {
        $this->theses->removeElement($these);
        $this->source = $source;
        return $this;
    }

}
 No newline at end of file