DDC-1816: DiscriminatorColumn Metadata wrong #2287

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

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

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user flo:

The discriminator column metadata (inheritance) is not properly processed. For example, using an entity described by XML annotations containing

xml<discriminiator-column name="category" type="string" length="30"/>

will generate wrong SQL queries containing the column 'dtype' instead of 'category' when using an XML metadata driver.
Generating classes from the XML metadata with

doctrine orm:generate-entities --generate-annotations="true" --generate-methods="true" entities

produces wrong docblock annotations like

@ORM\DiscriminatorColumn(name="r", type="r", length=r)

However, the entity works as expected after correcting the annotation values and replacing the XML meatdata driver by an annotation metadata driver.

Originally created by @doctrinebot on GitHub (May 8, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user flo: The discriminator column metadata (inheritance) is not properly processed. For example, using an entity described by XML annotations containing `xml<discriminiator-column name="category" type="string" length="30"/>` will generate wrong SQL queries containing the column 'dtype' instead of 'category' when using an XML metadata driver. Generating classes from the XML metadata with `doctrine orm:generate-entities --generate-annotations="true" --generate-methods="true" entities` produces wrong docblock annotations like `@ORM\DiscriminatorColumn(name="r", type="r", length=r)` However, the entity works as expected after correcting the annotation values and replacing the XML meatdata driver by an annotation metadata driver.
admin added the Bug label 2026-01-22 13:47:24 +01:00
admin closed this issue 2026-01-22 13:47:24 +01:00
Author
Owner

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

Comment created by @beberlei:

It works for me https://github.com/doctrine/doctrine2/commit/7b758eee573a2667fccfe72dabacf3639c960911

Can you post your XML mapping that produces this behavior?

@doctrinebot commented on GitHub (Jul 8, 2012): Comment created by @beberlei: It works for me https://github.com/doctrine/doctrine2/commit/7b758eee573a2667fccfe72dabacf3639c960911 Can you post your XML mapping that produces this behavior?
Author
Owner

@doctrinebot commented on GitHub (May 1, 2013):

Comment created by @beberlei:

No feedback given

@doctrinebot commented on GitHub (May 1, 2013): Comment created by @beberlei: No feedback given
Author
Owner

@doctrinebot commented on GitHub (May 1, 2013):

Issue was closed with resolution "Incomplete"

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

No dependencies set.

Reference: doctrine/archived-orm#2287