[DDC-1816] DiscriminatorColumn Metadata wrong Created: 08/May/12  Updated: 01/May/13  Resolved: 01/May/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Mapping Drivers
Affects Version/s: 2.2.1, 2.2.2
Fix Version/s: None
Security Level: All

Type: Bug Priority: Minor
Reporter: Florian Schmedding Assignee: Benjamin Eberlei
Resolution: Incomplete Votes: 0
Labels: None

Windows 7, PHP 5.38


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

<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.

Comment by Benjamin Eberlei [ 08/Jul/12 ]

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

Can you post your XML mapping that produces this behavior?

Comment by Benjamin Eberlei [ 01/May/13 ]

No feedback given

Generated at Sat Oct 10 03:08:51 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.