Ver Mensaje Individual
  #6 (permalink)  
Antiguo 26/02/2014, 17:54
Esdras_mtz
 
Fecha de Ingreso: febrero-2014
Ubicación: Edo. México
Mensajes: 85
Antigüedad: 10 años, 2 meses
Puntos: 0
Respuesta: Editar y guardar en formularios embebidos 2.4

Hola hhs, aqui estan:

Entidades:
Código PHP:
<?php

namespace FutbolMainBundleEntity
;

use 
DoctrineORMMapping as ORM;
use 
DoctrineCommonCollectionsArrayCollection;

/**
 * Torneos
 *
 * @ORM\Table(name="torneos", indexes={@ORM\Index(name="id_Cliente", columns={"id_Cliente"})})
 * @ORM\Entity
 */
class Torneos
{
    
/**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    
private $id;

    
/**
     * @var string
     *
     * @ORM\Column(name="nombre", type="string", length=200, nullable=false)
     */
    
private $nombre;

    
/**
     * @var string
     *
     * @ORM\Column(name="categoria", type="string", length=100, nullable=false)
     */
    
private $categoria;

    
/**
     * @var string
     *
     * @ORM\Column(name="genero", type="string", length=1, nullable=true)
     */
    
private $genero;

    
/**
     * @var \DateTime
     *
     * @ORM\Column(name="fechaInicio", type="date", nullable=false)
     */
    
private $fechainicio;

    
/**
     * @var \DateTime
     *
     * @ORM\Column(name="fechaFin", type="date", nullable=false)
     */
    
private $fechafin;

    
/**
     * @var \Clientes
     *
     * @ORM\ManyToOne(targetEntity="Clientes", inversedBy="Torneos")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="id_Cliente", referencedColumnName="id")
     * })
     */
    
private $idCliente;
    
    
    
/**
     * @ORM\OneToMany(targetEntity="Inscripcionequipo", mappedBy="idTorneo", cascade={"persist"})
     */    
    
private $insEqTorneos;
            
    public function 
__construct()
    {
        
$this->insEqTorneos = new ArrayCollection();
    }
    


    
/**
     * Get id
     *
     * @return integer 
     */
    
public function getId()
    {
        return 
$this->id;
    }

    
/**
     * Set nombre
     *
     * @param string $nombre
     * @return Torneos
     */
    
public function setNombre($nombre)
    {
        
$this->nombre $nombre;

        return 
$this;
    }

    
/**
     * Get nombre
     *
     * @return string 
     */
    
public function getNombre()
    {
        return 
$this->nombre;
    }

    
/**
     * Set categoria
     *
     * @param string $categoria
     * @return Torneos
     */
    
public function setCategoria($categoria)
    {
        
$this->categoria $categoria;

        return 
$this;
    }

    
/**
     * Get categoria
     *
     * @return string 
     */
    
public function getCategoria()
    {
        return 
$this->categoria;
    }

    
/**
     * Set genero
     *
     * @param string $genero
     * @return Torneos
     */
    
public function setGenero($genero)
    {
        
$this->genero $genero;

        return 
$this;
    }

    
/**
     * Get genero
     *
     * @return string 
     */
    
public function getGenero()
    {
        return 
$this->genero;
    }

    
/**
     * Set fechainicio
     *
     * @param \DateTime $fechainicio
     * @return Torneos
     */
    
public function setFechainicio($fechainicio)
    {
        
$this->fechainicio $fechainicio;

        return 
$this;
    }

    
/**
     * Get fechainicio
     *
     * @return \DateTime 
     */
    
public function getFechainicio()
    {
        return 
$this->fechainicio;
    }

    
/**
     * Set fechafin
     *
     * @param \DateTime $fechafin
     * @return Torneos
     */
    
public function setFechafin($fechafin)
    {
        
$this->fechafin $fechafin;

        return 
$this;
    }

    
/**
     * Get fechafin
     *
     * @return \DateTime 
     */
    
public function getFechafin()
    {
        return 
$this->fechafin;
    }

    
/**
     * Set idCliente
     *
     * @param \Futbol\MainBundle\Entity\Clientes $idCliente
     * @return Torneos
     */
    
public function setIdCliente(FutbolMainBundleEntityClientes $idCliente null)
    {
        
$this->idCliente $idCliente;

        return 
$this;
    }

    
/**
     * Get idCliente
     *
     * @return \Futbol\MainBundle\Entity\Clientes 
     */
    
public function getIdCliente()
    {
        return 
$this->idCliente;
    }

    
/**
     * Add insEqTorneos
     *
     * @param \Futbol\MainBundle\Entity\Inscripcionequipo $insEqTorneos
     * @return Torneos
     */
    
public function addInsEqTorneo(Inscripcionequipo $insEqTorneos)
    {
//        $this->insEqTorneos[] = $insEqTorneos;

          
$insEqTorneos->setIdTorneo($this);
          
$this->insEqTorneos->add($insEqTorneos);

        return 
$this;
    }

    
/**
     * Remove insEqTorneos
     *
     * @param \Futbol\MainBundle\Entity\Inscripcionequipo $insEqTorneos
     */
    
public function removeInsEqTorneo(FutbolMainBundleEntityInscripcionequipo $insEqTorneos)
    {
        
$this->insEqTorneos->removeElement($insEqTorneos);
    }

    
/**
     * Get insEqTorneos
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    
public function getInsEqTorneos()
    {
        return 
$this->insEqTorneos;
    }
}
Código PHP:
<?php

namespace FutbolMainBundleEntity
;

use 
DoctrineORMMapping as ORM;

/**
 * Inscripcionequipo
 *
 * @ORM\Table(name="inscripcionequipo", indexes={@ORM\Index(name="id_Equipo", columns={"id_Equipo", "id_Torneo"}), @ORM\Index(name="id_Torneo", columns={"id_Torneo"}), @ORM\Index(name="id_Cliente", columns={"id_Cliente"}), @ORM\Index(name="IDX_D99F714BE507E3D0", columns={"id_Equipo"})})
 * @ORM\Entity
 */
class Inscripcionequipo
{
    
/**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    
private $id;
    
     
/**
     * @var integer
     *
     * @ORM\Column(name="jj", type="integer", nullable=true)
     */
    
private $jj;

   

    
    
/**
     * @var float
     *
     * @ORM\Column(name="pago", type="float", precision=6, scale=2, nullable=true)
     */
    
private $pago;
   
   
    
/**
     * @var \Equipos
     *
     * @ORM\ManyToOne(targetEntity="Equipos", inversedBy="insEqEquipos", cascade={"persist"})
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="id_Equipo", referencedColumnName="id")
     * })
     */
    
private $idEquipo;

    
/**
     * @var \Torneos
     *
     * @ORM\ManyToOne(targetEntity="Torneos", inversedBy="insEqTorneos", cascade={"persist"})
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="id_Torneo", referencedColumnName="id")
     * })
     */
    
private $idTorneo;

    

    
/**
     * Get id
     *
     * @return integer 
     */
    
public function getId()
    {
        return 
$this->id;
    }
    
    
/**
     * Set pago
     *
     * @param float $pago
     * @return Inscripcionequipo
     */
    
public function setPago($pago)
    {
        
$this->pago $pago;

        return 
$this;
    }

    
/**
     * Get pago
     *
     * @return float 
     */
    
public function getPago()
    {
        return 
$this->pago;
    }   

    
/**
     * Set idEquipo
     *
     * @param \Futbol\MainBundle\Entity\Equipos $idEquipo
     * @return Inscripcionequipo
     */
    
public function setIdEquipo(FutbolMainBundleEntityEquipos $idEquipo null)
    {
        
$this->idEquipo $idEquipo;

        return 
$this;
    }

    
/**
     * Get idEquipo
     *
     * @return \Futbol\MainBundle\Entity\Equipos 
     */
    
public function getIdEquipo()
    {
        return 
$this->idEquipo;
    }

    
/**
     * Set idTorneo
     *
     * @param \Futbol\MainBundle\Entity\Torneos $idTorneo
     * @return Inscripcionequipo
     */
    
public function setIdTorneo(FutbolMainBundleEntityTorneos $idTorneo null)
    {
        
$this->idTorneo $idTorneo;

        return 
$this;
    }

    
/**
     * Get idTorneo
     *
     * @return \Futbol\MainBundle\Entity\Torneos 
     */
    
public function getIdTorneo()
    {
        return 
$this->idTorneo;
    }
  
    
/**
     * Set jj
     *
     * @param integer $jj
     * @return Inscripcionequipo
     */
    
public function setJj($jj)
    {
        
$this->jj $jj;

        return 
$this;
    }

    
/**
     * Get jj
     *
     * @return integer 
     */
    
public function getJj()
    {
        return 
$this->jj;
    }    
}