diff options
author | Christophe Coevoet <stof@notk.org> | 2011-04-09 01:30:40 +0200 |
---|---|---|
committer | Christophe Coevoet <stof@notk.org> | 2011-04-09 01:30:40 +0200 |
commit | 8b77c14ef43dd12788362f2a37253d0d1cd802f7 (patch) | |
tree | 94ff074f0111a1e98b81ba62a4d22f0dc3372016 | |
parent | c59833674e152cdac4209866173c7c4b8ad09541 (diff) |
Fixed Mandate mapping and normalization
-rw-r--r-- | src/Sde/WebserviceBundle/Entity/Mandate.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Sde/WebserviceBundle/Entity/Mandate.php b/src/Sde/WebserviceBundle/Entity/Mandate.php index 3fd4912..458c94b 100644 --- a/src/Sde/WebserviceBundle/Entity/Mandate.php +++ b/src/Sde/WebserviceBundle/Entity/Mandate.php @@ -43,14 +43,14 @@ class Mandate implements NormalizableInterface /** * @var \DateTime * - * @orm:Column(name="datedeb", type="datetime") + * @orm:Column(name="datedeb", type="date") */ private $start; /** * @var \DateTime * - * @orm:Column(name="datefin", type="datetime", nullable="true") + * @orm:Column(name="datefin", type="date", nullable="true") */ private $end; @@ -166,7 +166,7 @@ class Mandate implements NormalizableInterface return array( 'id' => $this->getId(), 'start' => $this->getStartDate()->format('U'), - 'end' => $this->getEndDate()->format('U'), + 'end' => null === $this->getEndDate() ? null : $this->getEndDate()->format('U'), 'position' => $normalizer->normalize($this->getPosition(), $format), 'student' => $normalizer->normalize($this->getStudent(), $format), ); |