In annotation based mapping, as per the documentation of doctrine, we can do as shown below:
/** @Column(type="string", columnDefinition="ENUM('visible', 'invisible')") */
My question is how do I represent this in yaml meta data file for doctrine?
I want to do something like this:
fields:
status:
type: string
columnDefinition: ....
I am using symfony 2 as framework
Just use:
fields:
status:
type: string
columnDefinition: ENUM('visible', 'invisible')
status:
type: enum
values: ['visible', 'invisible']
https://www.doctrine-project.org/projects/doctrine1/en/latest/manual/yaml-schema-files.html#enums
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With