How to bake enum fields on mysql?

Good morning,
I’m using Cakephp 2.10.13.
After a search on this forum and on Google, I haven’t found a valid solution about baking tables with “enum” type of fields.
Can you help me?


My recollection is that, since enums are not a SQL standard, Cake doesn’t include support for them. Instead, I use int fields with constants defined in the code.

Ok thank you.
I hope that the future releases of cakephp could be compatible with enum field.


A lot of people think enums are bad in general, and there’s not a lot of database support for them, so it seems maybe unlikely. Here’s an article detailing some of the problems with them:

It reminds me of something I forgot earlier, which is that not all of my potential enum use cases are handled with defined constants; some are better off being IDs into other tables that exist solely for this cross-reference purpose.