Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mathieu
potage
Commits
ea2e9453
Commit
ea2e9453
authored
Jul 04, 2018
by
Mat
Browse files
API queries, pose des limites de profondeurs dans les entités
parent
7cb09523
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/PotageBundle/Entity/Info.php
View file @
ea2e9453
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
PotageBundle\Entity
;
namespace
PotageBundle\Entity
;
use
JMS\Serializer\Annotation\MaxDepth
;
use
Doctrine\Common\Collections\ArrayCollection
;
use
Doctrine\Common\Collections\ArrayCollection
;
use
Doctrine\Common\Collections\Collection
;
use
Doctrine\Common\Collections\Collection
;
use
Doctrine\ORM\Mapping
as
ORM
;
use
Doctrine\ORM\Mapping
as
ORM
;
...
@@ -27,6 +28,7 @@ class Info
...
@@ -27,6 +28,7 @@ class Info
/**
/**
* @var int
* @var int
* @ORM\ManyToMany(targetEntity="PotageBundle\Entity\Lettre", mappedBy="infos")
* @ORM\ManyToMany(targetEntity="PotageBundle\Entity\Lettre", mappedBy="infos")
* @MaxDepth(3)
*/
*/
private
$lettres
;
private
$lettres
;
...
...
src/PotageBundle/Entity/Lettre.php
View file @
ea2e9453
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
PotageBundle\Entity
;
namespace
PotageBundle\Entity
;
use
JMS\Serializer\Annotation\MaxDepth
;
use
Doctrine\Common\Collections\ArrayCollection
;
use
Doctrine\Common\Collections\ArrayCollection
;
use
Doctrine\ORM\Mapping
as
ORM
;
use
Doctrine\ORM\Mapping
as
ORM
;
...
@@ -27,6 +28,7 @@ class Lettre
...
@@ -27,6 +28,7 @@ class Lettre
* @var int
* @var int
* @ORM\ManyToOne(targetEntity="PotageBundle\Entity\Offre", inversedBy="lettres")
* @ORM\ManyToOne(targetEntity="PotageBundle\Entity\Offre", inversedBy="lettres")
* @ORM\JoinColumn(name="id_offre", nullable=false)
* @ORM\JoinColumn(name="id_offre", nullable=false)
* @MaxDepth(2)
*/
*/
private
$offre
;
private
$offre
;
...
@@ -44,6 +46,7 @@ class Lettre
...
@@ -44,6 +46,7 @@ class Lettre
* @var int
* @var int
* @ORM\ManyToOne(targetEntity="PotageBundle\Entity\Groupe", inversedBy="lettres")
* @ORM\ManyToOne(targetEntity="PotageBundle\Entity\Groupe", inversedBy="lettres")
* @ORM\JoinColumn(name="id_groupe", nullable=false)
* @ORM\JoinColumn(name="id_groupe", nullable=false)
* @MaxDepth(2)
*/
*/
private
$groupe
;
private
$groupe
;
...
...
src/PotageBundle/Entity/Offre.php
View file @
ea2e9453
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
PotageBundle\Entity
;
namespace
PotageBundle\Entity
;
use
JMS\Serializer\Annotation\MaxDepth
;
use
Doctrine\Common\Collections\ArrayCollection
;
use
Doctrine\Common\Collections\ArrayCollection
;
use
Doctrine\ORM\Mapping
as
ORM
;
use
Doctrine\ORM\Mapping
as
ORM
;
...
@@ -27,12 +28,14 @@ class Offre
...
@@ -27,12 +28,14 @@ class Offre
/**
/**
* @var OffreLegumes[]
* @var OffreLegumes[]
* @ORM\OneToMany(targetEntity="PotageBundle\Entity\OffreLegumes", mappedBy="offre")
* @ORM\OneToMany(targetEntity="PotageBundle\Entity\OffreLegumes", mappedBy="offre")
* @MaxDepth(2)
*/
*/
private
$offreLegumes
;
private
$offreLegumes
;
/**
/**
* @var Lettre[]
* @var Lettre[]
* @ORM\OneToMany(targetEntity="PotageBundle\Entity\Lettre", mappedBy="offre")
* @ORM\OneToMany(targetEntity="PotageBundle\Entity\Lettre", mappedBy="offre")
* @MaxDepth(2)
*/
*/
private
$lettres
;
private
$lettres
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment