I am trying to follow the "getting started" tutorial of the official 
Doctrine site 
(http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/getting-started.html)
 
.

I am trying to make the YAML configuration generate my classes + 
databasetables inside a zend framework 2 enviroment.

I copied both the Product.php and the Product.dcm.yml in the right places, 
but if I run

*vendor/bin/doctrine orm:generate-entities 
module/Application/src/Application/Entity/*

from the root of the zend framework project, I get:

"Invalid mapping file 'Product.dcm.yml' for class 'Product'."

I copied those 2 files perfectly, so I do not understand what is going 
wrong, could somebody help me?

Just for good order, my 2 files:

# config/yaml/Product.dcm.yml
> Product:
>   type: entity
>   table: products
>   id:
>     id:
>       type: integer
>       generator:
>         strategy: AUTO
>   fields:
>     name:
>       type: string
>

 <?php
> // src/Product.php
> class Product
> {
>     /**
>      * @var int
>      */
>     protected $id;
>     /**
>      * @var string
>      */
>     protected $name;
>
>     public function getId()
>     {
>         return $this->id;
>     }
>
>     public function getName()
>     {
>         return $this->name;
>     }
>
>     public function setName($name)
>     {
>         $this->name = $name;
>     }
> }

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to