ollyg/Catalyst-Plugin-AutoCRUD

enum via config

Closed this issue · 1 comments

rt.cpan 67797

Plugin/AutoCRUD/Model/Metadata/DBIC.pm
54a55,56

$xtype_for{'enum'} = 'combo';

279a282,284

$ti->{cols}->{$col}->{extra} = $info->{extra}
if (exists $info->{extra});
Plugin/AutoCRUD/templates/full-fat/javascript/update/tabs.tt
104a105,115
[% CASE 'combo' %]
,store: new Ext.data.SimpleStore({
fields: [ '[% field %]' ],
data: [
[% FOREACH option IN info.cols.$field.extra.list %]
['[% option %]'],
[% END %]
]})
,displayField: '[% field %]'
,mode: 'local'
,triggerAction: 'all'

As there appears to be no standard ENUM support in DBIC, and ENUM is widely believed to be unnecessary sugar in place of a proper relationship then I'm inclined not to support this.

see also: DBIx::Class::InflateColumn::Object::Enum