Merge 'trunk' into 'view-deps'
[dbsrgits/DBIx-Class.git] / t / lib / ViewDeps / Result / Foo.pm
CommitLineData
1e70d9dc 1package # hide from PAUSE
6ebf5cbb 2 ViewDeps::Result::Foo;
3
4use strict;
5use warnings;
ebed3aaf 6use base qw(ViewDeps::Result::Quux);
6ebf5cbb 7
ebed3aaf 8__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
6ebf5cbb 9__PACKAGE__->table('foo');
bf5c3a3f 10
ebed3aaf 11__PACKAGE__->result_source_instance->view_definition(
12 "select * from just_a_table");
bf5c3a3f 13
6ebf5cbb 14__PACKAGE__->add_columns(
1e70d9dc 15 id => { data_type => 'integer', is_auto_increment => 1 },
16 a => { data_type => 'integer', is_nullable => 1 }
6ebf5cbb 17);
18
19__PACKAGE__->set_primary_key('id');
20
1e70d9dc 21__PACKAGE__->belongs_to( 'bar', 'ViewDeps::Result::Bar',
22 { 'foreign.id' => 'self.a' } );
6ebf5cbb 23
241;