Most of the code reviewed... Missing ResultSet->populate, ResultSet->find, Row->copy...
[dbsrgits/DBIx-Class-Historic.git] / t / lib / DBICTest / Schema / BooksInLibrary.pm
1 package # hide from PAUSE 
2     DBICTest::Schema::BooksInLibrary;
3
4 use base qw/DBICTest::BaseResult/;
5
6 __PACKAGE__->table('books');
7 __PACKAGE__->add_columns(
8   'id' => {
9     data_type => 'integer',
10     is_auto_increment => 1,
11   },
12   'source' => {
13     data_type => 'varchar',
14     size      => '100',
15   },
16   'owner' => {
17     data_type => 'integer',
18   },
19   'title' => {
20     data_type => 'varchar',
21     size      => '100',
22   },
23   'price' => {
24     data_type => 'integer',
25     is_nullable => 1,
26   },
27 );
28 __PACKAGE__->set_primary_key('id');
29
30 __PACKAGE__->add_unique_constraint (['title']);
31
32 __PACKAGE__->resultset_attributes({where => { source => "Library" } });
33
34 __PACKAGE__->belongs_to ( owner => 'DBICTest::Schema::Owners', 'owner' );
35
36 1;