DDC-1821: Doctrine tool generates classes who's meta data cannot be read by annotation driver #2292

Closed
opened 2026-01-22 13:47:33 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (May 15, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user jonathanpete:

I have xml files defining entities. These get turned into classes via doctrine tool.

The doctrine tool generates metadata with "Doctrine\ORM\Mapping" proceeding the metaname.

for example:

use Doctrine\ORM\Mapping as ORM;

/****

  • Person
    *
  • @ORM\Table(name="person")
  • @ORM\Entity
    */

This breaks the annotation reader.

If I manually change the class to look like:

/****

  • Person
    *
  • @Table(name="person")
  • @Entity
    */

Everything works happily.

Originally created by @doctrinebot on GitHub (May 15, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user jonathanpete: I have xml files defining entities. These get turned into classes via doctrine tool. The doctrine tool generates metadata with "Doctrine\ORM\Mapping" proceeding the metaname. for example: use Doctrine\ORM\Mapping as ORM; /**** - Person * - @ORM\Table(name="person") - @ORM\Entity */ This breaks the annotation reader. If I manually change the class to look like: /**** - Person * - @Table(name="person") - @Entity */ Everything works happily.
admin added the Bug label 2026-01-22 13:47:33 +01:00
admin closed this issue 2026-01-22 13:47:34 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jun 8, 2012):

Comment created by @ocramius:

Not a bug. It is suggested to use the AnnotationReader instead of the SimpleAnnotationReader.

@doctrinebot commented on GitHub (Jun 8, 2012): Comment created by @ocramius: Not a bug. It is suggested to use the AnnotationReader instead of the SimpleAnnotationReader.
Author
Owner

@doctrinebot commented on GitHub (Jul 4, 2012):

Comment created by @beberlei:

You have to set $generator->setAnnotationPrefix("");

@doctrinebot commented on GitHub (Jul 4, 2012): Comment created by @beberlei: You have to set $generator->setAnnotationPrefix("");
Author
Owner

@doctrinebot commented on GitHub (Jul 4, 2012):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Jul 4, 2012): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2292