Zbigniew Lukasiak wrote:
> Hi,
>
> In InstantCRUD I've migrated from putting the labels (and other
> visuals) into the DBIC structures. It just felt not really clean
> having the presentation parts in the database layer.
>
> --
> Zbyszek
>
> On 11/2/06, John Napiorkowski <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> Right now if I stuff extra things into the column
>> metadata info like so:
>>
>> __PACKAGE__->add_columns(
>> "thumbnail_path",
>> {
>> data_type => "VARCHAR",
>> default_value => "",
>> is_nullable => 0,
>> size => 255,
>> label => "Thumbnail Path",
>> field_type=>"Textfield",
>> },
>>
>> I can retrieve that via the result_source column info
>> method. My question is do people think me putting my
>> metadata here is a bad idea, in the sense that in some
>> future revision of DBIx the metadata will have some
>> sort of enforcement and won't support my arbitrary key
>> values anymore?
>>
>> Thanks!
>>
>>
>> John
>>I would say this is the proper separation. Things in column_info should be restricted to describing what the field _is_, not what it _does_ or where it's used. So, stick to DB meta information..sizes, types, defaults, nullable, primary, etc.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
