# Generated by Pod::WikiDoc version 0.17

=pod

=head1 NAME

Class::Dot::Model::Table - Attach table to class.

=head1 VERSION

This document describes Class::Dot::Model version v%%VERSION%%

=head1 SYNOPSIS

     package My::Model::Cat;
     use Class::Dot::Model::Table qw(:std);
 
     Table       'cats';
     Columns     qw( id gender dna action colour );
     Primary_Key 'id';
     Has_Many    'memories'
         => 'My::Model::Cat::Memory';

=head1 DESCRIPTION

Pretty way of defining a DBIx table class.

=head1 SUBROUTINESE<sol>METHODS

=head2 EXPORTED SUBROUTINES

=head3 C<<< Table $database_table >>> 

=for apidoc VOID Table(string $database_table)

Set the database table this class should be connected to.

=head3 C<<< Columns @columns|%$columns >>>

=for apidoc VOID Columns(ARRAY @columns E<verbar> HASHREF %$columns)

A list of columns in the database table.

=head3 C<<< Primary_Key $column_name >>>

=for apidoc Primary_Key(string $column_name)

Sets which column in the columns above that is the primary key for this table.

See L<DBIx::Class::Relationships> for more information on relationships.

=head3 C<<< Belongs_To $accessor_name => $related_class >>>

=for apidoc Belongs_To(string $accessor_name, _CLASS $related_class)

Create a belongs to relationship with a parent table.

See L<DBIx::Class::Relationships> for more information on relationships.

=head3 C<<< Has_Many $accessor_name => $related_class >>>

=for apidoc Has_Many(string $accessor_name, _CLASS $related_class)

Creates a one-to-many releationship with another database table.

See L<DBIx::Class::Relationships> for more information on relationships.

=head3 C<<< Many_To_Many $accessor_name => $link_rel_name, $foreign_rel_name, $opt_attr? >>>

Creates a many-to-many relationship from one table to another.

=head2 PRIVATE SUBROUTINES

=head3 C<<< requires() >>>

Used by LE<lt>Class::Dot::Model::PreloadE<gt> to know which modules this module
requires.

=head1 DIAGNOSTICS

None.

=head1 CONFIGURATION AND ENVIRONMENT

This module uses no external configuration or environment variables.

=head1 DEPENDENCIES

=over

=item *

L<DBIx::Class>

=back

=over

=item *

L<Class::Dot>

=back

=over

=item *

L<Class::Plugin::Util>

=back

=over

=item *

L<Params::Util>

=back

=over

=item *

L<Config::PlConfig>

=back

=over

=item *

L<version>

=back

=head1 INCOMPATIBILITIES

None known.

=head1 BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to
L<bug-class-dot-model@rt.cpan.org|mailto:class-dot-model@rt.cpan.org>, or through the web interface at
L<CPAN Bug tracker|http://rt.cpan.org>.

=head1 SEE ALSO

=head2 L<Class::Dot::Model>

=head2 L<DBIx::Class>

=head2 L<Class::Dot>

=head2 L<DBIx::Class::Relationships>

=head2 L<DBIx::Class::Manual::Cookbook>

=head1 AUTHOR

Ask Solem, L<ask@0x61736b.net>.

=head1 LICENSE AND COPYRIGHT

Copyright (c), 2007 Ask Solem L<ask@0x61736b.net|mailto:ask@0x61736b.net>.

All rights reserved.

This library is free software; you can redistribute it andE<sol>or modify
it under the same terms as Perl itself, either Perl version 5.8.6 or,
at your option, any later version of Perl 5 you may have available.

=head1 DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS ANDE<sol>OR OTHER PARTIES PROVIDE THE
SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY ANDE<sol>OR REDISTRIBUTE THE
SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER
SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.



# Local Variables:
#   mode: cperl
#   cperl-indent-level: 4
#   fill-column: 78
# End:
# vim: expandtab tabstop=4 shiftwidth=4 shiftround

