You renamed @Table into @ORM\Table, but you forgot to do the same for @Entity.
Consider that DoctrineORMModule disabled the short annotation syntax because it is troublesome in large project, as it collides with other annotations as well. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 13 February 2015 at 18:04, Grubolsch <[email protected]> wrote: > I try to integrate Doctrine 2 into Zend Framework 2 - which works, except > for the command line interface. > >> I use the command vendor/bin/doctrine-module orm:schema-tool:create >> > First I had in my model class: > >> <?phpnamespace Application\Entity; >> /** >> * @Entity >> * @ORM\Table(name="product") >> * @property int $id >> * @property string $title >> * @property string $text >> */class Product {} >> >> I got this as response: > >> [Doctrine\Common\Annotations\AnnotationException] >> [Semantical Error] The annotation "@Entity" in class >> Application\Entity\Product was never imported. Did you maybe forget to add a >> "use" statement for this annotation? >> >> So I searched on Google and did the following: > >> <?phpnamespace Application\Entity; >> use Doctrine\ORM\Mapping as ORM;use Doctrine\ORM\Mapping\Entity; >> /** >> * @Entity >> * @ORM\Table(name="posts") >> * @property int $id >> * @property string $title >> * @property string $text >> */class Product >> >> However, now I just get > >> No Metadata Classes to process. >> >> What am I doing wrong? > > -- > 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. > -- 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.
