[Dbix-class] enum column values

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Tue Mar 8 14:39:08 GMT 2011


Rob Kinyon wrote:
> Have you tried just using the column without declaring the enum
> values? The stuff in column_info isn't really used unless you're
> creating the schema from DBIC. DBIC doesn't actually do any validation
> of enum values (or anything else, for that matter) when you read from
> or write to the database.

I hadn't no; I foolishly assumed that all the data in add_columns was
there for some purpose :)  But you're quite right, there seems to be no
need to jump through the remove_column, add_column hoop.

So I've just created a specific method to read the enum values from the
database. That seems to work.

Thanks, Dave




More information about the DBIx-Class mailing list