Columns of type ENUM in Doctrine2 model after import

0 votes
asked Apr 11, 2014 in Feature Request by jwagner (3,630 points)
retagged Jun 26, 2014 by Martin Freki Stradej

ORM Designer version 2.3.5.882, MVC: Symfony2, ORM: Doctrine2

I recently imported an existing model from MySQL Workbench into a Doctrine2 project. There were several columns defined as type ENUM, which is fine for a MySQL-specific model. However, Doctrine does not recognize these so I had to manually change them all to "string" and copy the enum values to columnDefinition.

I changed all instances in this model, since there were "only" around 20 enum columns. But for a larger model this could become problematic and would require an automated solution.

Is there a way that ORMD2 could support this process? I understand your concerns about database-specific workarounds for a database-agnostic DBAL / ORM (see #142), but in this use case it clearly is a MySQL-only scenario.

Minimal test case: https://www.wuala.com/JWag/ormdtest/mwbimport.zip?key=ormd2

commented Apr 11, 2014 by Martin Freki Stradej Skipper developer (74,840 points)

Thank you for bringing this up. It should be pretty straightforward to implement into ORM Designer. We will have a look at it and let you know.

commented Oct 28, 2014 by kukoman (340 points)

hi there,
i have exactly the same situation

as enum is correct mysql type and doctrine2 can work with it (although you have to register it manualy), i think it should be handled with orm designer and not give me a fatal error after exporting entities

Please log in or register to answer this question.

...