Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Problems in generate models from yml
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
WishCow  
View profile  
 More options May 1 2011, 4:25 pm
From: WishCow <vis...@gmail.com>
Date: Sun, 1 May 2011 13:25:10 -0700 (PDT)
Local: Sun, May 1 2011 4:25 pm
Subject: Re: Problems in generate models from yml
You need to supply a directory as a second parameter, where doctrine
will place the generated entities.

Eg.: C:\xampp\php\php.exe doctrine.php orm:generate-entities C:\project
\entities\

On máj. 1, 17:24, Luis Mercado Medina <luis.mercado.med...@gmail.com>
wrote:

> Hi

> Well i have a problems first y generate my yml with plugyn the mysql
> workbench, after I configure my doctrine cli-config.php that is, the
> directory where is my file is library\schema\schema.yml(see image attached),
> then i run this, and y don't can any :( my yml under lines

> C:\xampp\htdocs\doctrine\library>C:\xampp\php\php.exe doctrine.php
> orm:generate-entities

>   [RuntimeException]
>   Not enough arguments.

> <?php

> $classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
> $classLoader->register();

> $classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
> $classLoader->register();

> $config = new \Doctrine\ORM\Configuration();
> $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache);
> $config->setProxyDir(__DIR__ . '/Proxies');
> $config->setProxyNamespace('Proxies');

> $driver = new Doctrine\ORM\Mapping\Driver\YamlDriver(array(__DIR__
>         . "/schema/"));
> $config->setMetadataDriverImpl($driver);

> $connectionOptions = array(
>     'driver' => 'pdo_mysql',
>     'dbname' => 'test',
>     'user' => 'root',
> //    'host' => 'localhost',
> );

> $em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config);

> $helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
>     'db' => new
> \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
>     'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
> ));
> //$cli->setHelperSet($helperSet);

> -----yml
> ---
> detect_relations: true
> options:
>   collate: utf8_spanish_ci
>   charset: utf8
>   type: InnoDB

> Cliente:
>   tableName: Clientes
>   columns:
>     idCliente:
>       type: integer(4)
>       primary: true
>       notnull: true
>       autoincrement: true
>     razonSocial:
>       type: string(100)
>       notnull: true

> Rubro:
>   tableName: Rubros
>   columns:
>     idrubro:
>       type: integer(4)
>       primary: true
>       notnull: true
>     nombre:
>       type: string(45)
>       unique: true
>       notnull: true
>   options:
>     charset: utf8
>     collate: utf8_spanish_ci

> Noticia:
>   tableName: Noticias
>   columns:
>     idNoticias:
>       type: integer(4)
>       primary: true
>       notnull: true
>       autoincrement: true
>     titulo:
>       type: string(100)
>       notnull: true
>     descripcion:
>       type: clob(65535)
>       notnull: true
>   options:
>     charset: utf8
>     collate: utf8_spanish_ci

> --
> _____________________________________________________________________
> Luis Mercado Medina

>  structure.jpg
> 58KMegtekintésNézet


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.