[Catalyst] add_columns()

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


Hi,

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

""
add_columns
...
    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:

""
        __PACKAGE__->add_columns(
            "created",
            { data_type => 'datetime', set_on_create => 1 },
            "updated",
            { 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.

Thanks.

Octavian




More information about the Catalyst mailing list