How to set the enum data type in doctrine 2

In annotation comparison, according to the documentation of the doctrine, we can do as shown below:

/** @Column(type="string", columnDefinition="ENUM('visible', 'invisible')") */

My question is, how can I represent this in the yaml metadata file for the doctrine?

I want to do something like this:

fields:
status:
  type: string
  columnDefinition: ....

I use symfony 2 as a framework

+6
source share
2 answers

Just use:

fields:
status:
  type: string
  columnDefinition: ENUM('visible', 'invisible')
+12
source

All Articles