[Catalyst] add_columns()

Octavian Râşniţă orasnita at gmail.com
Sun Jul 19 11:21:46 GMT 2009


In DBIx::Class::ResultSource.pm's POD documentation I read:

    Adds columns to the result source. If supplied key => hashref pairs,
    uses the hashref as the column_info for that column. Repeated calls of
    this method will add more columns, not replace them.

But in Catalyst::Manual::Tutorial::04_BasicCRUD.pod I read:

            { data_type => 'datetime', set_on_create => 1 },
            { data_type => 'datetime', set_on_create => 1, set_on_update => 
1 },

    This will override the definition for these fields that Schema::Loader
    placed at the top of the file.

What's the truth? Repeating calls of this method adds more columns and not 
replace them, or the columns are overriden?

I tend to believe the Catalyst tutorial, but I am not very sure.



More information about the Catalyst mailing list