This is a master model class which uses Class::DBI to do all the hard work of fetching rows and representing them as objects.
It is a good model to copy if you're replacing it with other database abstraction modules.

It implements a base set of methods required for a Maypole Data Model.

When specified as the application model,
it will use Class::DBI::Loader to generate the model classes from the provided database.
If you do not wish to use this functionality,
use Maypole::Model::CDBI::Plain which will instead use Class::DBI classes provided.

If there is an object in $r->objects,
then it should be edited with the parameters in $r->params; otherwise,
a new object should be created with those parameters,
and put back into $r->objects.
The template should be changed to view,
or edit if there were any errors.
A hash of errors will be passed to the template.