Explorar o código

Fix serializer

Guillermo Espinoza %!s(int64=8) %!d(string=hai) anos
pai
achega
d66fc9f166
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/FTTHBundle/Entity/ONU.php

+ 6 - 0
src/FTTHBundle/Entity/ONU.php

@@ -11,6 +11,7 @@ use Symfony\Component\Validator\Constraints as Assert;
 use Symfony\Component\Workflow\Exception\ExceptionInterface;
 use DeviceBundle\Validator\Constraints as ValidatorAssert;
 use DeviceBundle\Interfaces\DeviceInterface;
+use JMS\Serializer\Annotation as JMS;
 
 /**
  * ONU
@@ -102,22 +103,26 @@ class ONU implements DeviceInterface
 
     /**
      * @ORM\ManyToOne(targetEntity="OLT", inversedBy="onus", fetch="EXTRA_LAZY")
+     * @JMS\MaxDepth(1)
      */
     protected $olt;
 
     /**
      * @ORM\ManyToOne(targetEntity="ONUModel", inversedBy="onus", fetch="EXTRA_LAZY")
      * @ORM\JoinColumn(name="model_id", referencedColumnName="id", onDelete="SET NULL")
+     * @JMS\MaxDepth(1)
      */
     protected $model;
 
     /**
      * @ORM\ManyToOne(targetEntity="NAP", inversedBy="onus", fetch="EXTRA_LAZY")
+     * @JMS\MaxDepth(1)
      */
     protected $nap;
 
     /**
      * @ORM\ManyToOne(targetEntity="Profile", inversedBy="onus", fetch="EXTRA_LAZY")
+     * @JMS\MaxDepth(1)
      */
     protected $profile;
 
@@ -131,6 +136,7 @@ class ONU implements DeviceInterface
     /**
      * @ORM\ManyToOne(targetEntity="\WorkflowBundle\Entity\Workflow", fetch="EXTRA_LAZY")
      * @ORM\JoinColumn(name="workflow_id", referencedColumnName="id", onDelete="SET NULL")
+     * @JMS\MaxDepth(1)
      */
     protected $workflow;