Ver Mensaje Individual
  #6 (permalink)  
Antiguo 03/10/2014, 13:45
Avatar de hhs
hhs
Colaborador
 
Fecha de Ingreso: junio-2013
Ubicación: México
Mensajes: 2.995
Antigüedad: 10 años, 10 meses
Puntos: 379
Respuesta: Problemas con .yml

Hmmmm si ya tienes la definición del esquema generado por workbench. Digamos por ejemplo algo como:
Código yml:
Ver original
  1. Tkoo\EjemploBundle\Entity\Prueba:
  2.     type: entity
  3.     table: null
  4.     id:
  5.         id:
  6.             type: integer
  7.             id: true
  8.             generator:
  9.                 strategy: AUTO
  10.     fields:
  11.         nombre:
  12.             type: string
  13.             length: 255
  14.         edad:
  15.             type: integer
  16.         fecha:
  17.             type: date
  18.         direccion:
  19.             type: string
  20.             length: 255
ya que agregaste las relaciones, lo siguiente es guardarlo en el directorio: TkooEjemploBundle/Resources/Doctrine/Prueba.orm.yml(crear si no existe). Posterior a eso necesitas generar el schema y las entidades de la siguiente forma:
Código PHP:
Ver original
  1. app/console doctrine:schema:create
  2. app/console doctrine:generate:entities TkooEjemploBundle --no-backup
Con eso te ahorras algunos pasos.
__________________
Saludos
About me
Laraveles
A class should have only one reason to change.