Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/03/2014, 13:41
Avatar de yosandry91
yosandry91
 
Fecha de Ingreso: diciembre-2013
Mensajes: 34
Antigüedad: 10 años, 4 meses
Puntos: 0
problemas insertar en symfony2

Hola estoy tratando de insertar datos en la BD pero no me deja el error me lo da cuando
$producto=new Producto() me dice que no encuentra la entidad producto pero si existe junto con el rwepositorio (Creados por comando)


<?php

namespace Producto\ProductoBundle\Entity;


use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
* @ORM\Table(name="Producto")
*/
class Producto
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;

/**
* @ORM\Column(type="string", length=100)
*/
protected $precio;

/**
* @ORM\Column(type="decimal", scale=2)
*/
protected $nombre;

/**
* @ORM\Column(type="string", length=100)
*/
protected $descripcion;
/**
* @ORM\Column(type="text")
*/

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

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

return $this;
}

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

/**
* Set precio
*
* @param float $precio
* @return Producto
*/
public function setPrecio($precio)
{
$this->precio = $precio;

return $this;
}

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

/**
* Set descripcion
*
* @param string $descripcion
* @return Producto
*/
public function setDescripcion($descripcion)
{
$this->descripcion = $descripcion;

return $this;
}

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

Última edición por yosandry91; 27/03/2014 a las 13:45 Razón: No estaba claro el tema