Some tweaks to Componentised, many_to_many helper from abraxxa
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class.pm
CommitLineData
ea2e61bf 1package DBIx::Class;
2
5d283305 3use strict;
4use warnings;
5
5d283305 6use vars qw($VERSION);
3c0068c1 7use base qw/DBIx::Class::Componentised Class::Data::Accessor/;
8
9sub mk_classdata { shift->mk_classaccessor(@_); }
7411204b 10sub component_base_class { 'DBIx::Class' }
227d4dee 11
49995cc8 12$VERSION = '0.04999_02';
b8777a0d 13
ea2e61bf 141;
34d52be2 15
16=head1 NAME
17
7e4b2f59 18DBIx::Class - Extensible and flexible object <-> relational mapper.
34d52be2 19
20=head1 SYNOPSIS
21
22=head1 DESCRIPTION
23
8091aa91 24This is an SQL to OO mapper, inspired by the L<Class::DBI> framework,
34d52be2 25and meant to support compability with it, while restructuring the
8091aa91 26internals and making it possible to support some new features like
34d52be2 27self-joins, distinct, group bys and more.
28
8091aa91 29This project is still at an early stage, so the maintainers don't make
96ce20f5 30any absolute promise that full backwards-compatibility will be supported;
8091aa91 31however, if we can without compromising the improvements we're trying to
96ce20f5 32make, we will, and any non-compatible changes will merit a full justification
33on the mailing list and a CPAN developer release for people to test against.
daec44b8 34
35The community can be found via -
36
37 Mailing list: http://lists.rawmode.org/mailman/listinfo/dbix-class/
38
39 SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
40
41 Wiki: http://dbix-class.shadowcatsystems.co.uk/
42
43 IRC: irc.perl.org#dbix-class
44
39fe0e65 45=head1 QUICKSTART
46
8091aa91 47If you're using L<Class::DBI>, and want an easy and fast way of migrating to
48DBIx::Class, take a look at L<DBIx::Class::CDBICompat>.
39fe0e65 49
8091aa91 50There are two ways of using DBIx::Class, the "simple" way and the "schema" way.
51The "simple" way of using DBIx::Class needs less classes than the "schema"
52way but doesn't give you the ability to easily use different database connections.
39fe0e65 53
448c8424 54Some examples where different database connections are useful are:
39fe0e65 55
448c8424 56different users with different rights
57different databases with the same schema.
39fe0e65 58
00787068 59=head2 Simple
126042ee 60
8091aa91 61First you need to create a base class which all other classes will inherit from.
62See L<DBIx::Class::DB> for information on how to do this.
39fe0e65 63
8091aa91 64Then you need to create a class for every table you want to use with DBIx::Class.
65See L<DBIx::Class::Table> for information on how to do this.
448c8424 66
67=head2 Schema
68
8091aa91 69With this approach, the table classes inherit directly from DBIx::Class::Core,
70although it might be a good idea to create a "parent" class for all table
71classes that inherits from DBIx::Class::Core and adds additional methods
72needed by all table classes, e.g. reading a config file or loading auto primary
448c8424 73key support.
74
8091aa91 75Look at L<DBIx::Class::Schema> for information on how to do this.
448c8424 76
8091aa91 77If you need more help, check out the introduction in the
448c8424 78manual below.
39fe0e65 79
076652e8 80=head1 SEE ALSO
81
8091aa91 82=head2 L<DBIx::Class::Core> - DBIC Core Classes
83
84=head2 L<DBIx::Class::Manual> - User's manual
85
86=head2 L<DBIx::Class::CDBICompat> - L<Class::DBI> Compat layer
87
88=head2 L<DBIx::Class::DB> - database-level methods
076652e8 89
8091aa91 90=head2 L<DBIx::Class::Table> - table-level methods
076652e8 91
8091aa91 92=head2 L<DBIx::Class::Row> - row-level methods
076652e8 93
8091aa91 94=head2 L<DBIx::Class::PK> - primary key methods
076652e8 95
4db53147 96=head2 L<DBIx::Class::ResultSet> - search result-set methods
97
8091aa91 98=head2 L<DBIx::Class::Relationship> - relationships between tables
076652e8 99
3942ab4d 100=head1 AUTHOR
34d52be2 101
daec44b8 102Matt S. Trout <mst@shadowcatsystems.co.uk>
34d52be2 103
3942ab4d 104=head1 CONTRIBUTORS
105
106Andy Grundman <andy@hybridized.org>
107
108Brian Cassidy <bricas@cpan.org>
109
110Dan Kubb <dan.kubb-cpan@onautopilot.com>
111
112Dan Sully <daniel@cpan.org>
113
ccb9c9b1 114David Kamholz <dkamholz@cpan.org>
115
116Jules Bean
3942ab4d 117
118Marcus Ramberg <mramberg@cpan.org>
119
ccb9c9b1 120Paul Makepeace
121
34d52be2 122=head1 LICENSE
123
124You may distribute this code under the same terms as Perl itself.
125
126=cut
127