Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix discriminator column defaults #5590

Merged

Conversation

billschaller
Copy link
Member

DiscriminatorColumn mapping generated by all 3 metadata drivers (annot, yml, xml) was lacking length and type when only the name is specified in the mapping. Even though this results in a columnDef that generates a string column of length 255, the mapping for the discriminator column should have those fields set properly, and should be consistent with the behavior when no discriminator column mapping is specified at all.

Adjusted docs to properly reflect that the @DiscriminatorColumn annotation is optional.

Closes: #1601

Bill Schaller added 3 commits January 5, 2016 12:29
…l params type and length have proper defaults.
…atorColumn defaults for type and length.

Note: Even though the column definition generated for a discriminator column
would eventually default the type to string and length to 255, the docs specify
defaults that should be reflected explicitly in the discriminatorColumn mapping.
@Ocramius Ocramius self-assigned this Jan 5, 2016
@Ocramius Ocramius added the Bug label Jan 5, 2016
@Ocramius Ocramius added this to the 2.6.0 milestone Jan 5, 2016
@Ocramius
Copy link
Member

Ocramius commented Jan 5, 2016

The change is quite subtle, IMO: marked for 2.6.0 only therefore.

Ocramius added a commit that referenced this pull request Jan 5, 2016
…defaults

Fix discriminator column defaults
@Ocramius Ocramius merged commit ebe11c7 into doctrine:master Jan 5, 2016
@Ocramius
Copy link
Member

Ocramius commented Jan 5, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants