SYNOPSIS

    # use the helper
    create model CDBI CDBI dsn user password

    # lib/MyApp/Model/CDBI.pm
    package MyApp::Model::CDBI;

    use base 'Catalyst::Model::CDBI';

    _\|_PACKAGE_\|_->config(
        dsn           => 'dbi:Pg:dbname=myapp',
        password      => '',
        user          => 'postgres',
        options       => { AutoCommit => 1 },
        relationships => 1
    );

    1;

    # As object method
    $c->comp('MyApp::Model::CDBI::Table')->search(...);

    # As class method
    MyApp::Model::CDBI::Table->search(...);

DESCRIPTION

This is the \*(C`Class::DBI\*(C' model class. It's built on top of \*(C`Class::DBI::Loader\*(C'. \*(C`Class::DBI\*(C' is generally not used for new applications, with \*(C`DBIx::Class\*(C' being preferred instead. As such this model is deprecated and (mostly) unmaintained.

It is preserved here for older applications which still need it for backwards compatibility.

new

Initializes Class::DBI::Loader and loads classes using the class config. Also attempts to borg all the classes.

RELATED TO Catalyst::Model::CDBI…

Catalyst, Class::DBI Class::DBI::Loader

AUTHOR

Sebastian Riedel, \*(C`[email protected]\*(C'

CONTRIBUTORS

mst: Matt S Trout \*(C`[email protected]\*(C'

Arathorn: Matthew Hodgson \*(C`[email protected]\*(C'

COPYRIGHT

Copyright (c) 2005 - 2010 the Catalyst::Model::CDBI \*(L"\s-1AUTHOR\s0\*(R" and \*(L"\s-1CONTRIBUTORS\s0\*(R" as listed above.

This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.