Skip to content

Loading…

DDC-807: Adding columnDefinition for @DiscriminatorColumn #5324

Closed
doctrinebot opened this Issue · 5 comments

1 participant

@doctrinebot

Jira issue originally created by user lstrojny:

Current @DiscriminatorColumn does not allow to use a specific column definition. However, in the MySQL world it is quite common to use the ENUM or TINYINT datatype for efficient discriminator columns. It would be great if something like this would be possible:

@DiscriminatorColumn(name="member_type",type="string",columnDefinition="ENUM('ANONYMOUS','FREE','PREMIUM')")
@doctrinebot

Comment created by @beberlei:

How is ENUM efficient? Its a very bad datatype in my opinion with its sorting strangeness and alter table overhead ;)

@doctrinebot

Comment created by lstrojny:

The alternative with MySQL is TINYINT, which has the drawback of not being self documenting but also works. But this won't be possible with discriminator columns too.

@doctrinebot

Comment created by mjh_ca:

Duplicate of DDC-553

@doctrinebot

Comment created by @guilhermeblanco:

Fixed

e6b99c2

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.3 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.