i am new to Doctrine2 and have created entitie-classes from my existing database using the following command:
.\vendor\bin\doctrine-module orm:convert-mapping --force --from-database annotation ./EXPORT/
Now i have my Classes and they are looking like this:
<?php
namespace App\Model\Entity; // this line was not generated automatically
use Doctrine\ORM\Mapping as ORM;
/**
*
* Category
*
* @ORM\Table(name="category")
* @ORM\Entity
*/
class Category
{
/**
* @ORM\var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
....
Looks good, but i dont understand why there is "@ORM\" used before every notation in the docblocks. When i create queries they don't work until i remove this "@ORM\" bevore every notation. Did i miss something? I am not using any framework (Zend/Symfony...). I am just using "doctrine/orm": "~2.4" with composer.
Best regards Michael