use warnings;
use DBIx::Class::ResultSet;
-use SQL::Translator::Parser::DBIx::Class;
-use Data::Dumper::Concise;
use base qw/DBIx::Class/;
__PACKAGE__->load_components(qw/ResultSource/);
is( $bar_deps[0], 'baz', 'which is reported to depend on baz...' );
is( $bar_deps[1], 'mixin', 'and on mixin.' );
-is( $foo_deps[0], undef, 'Foo has no dependencies...' );
+is( $foo_deps[0], undef, 'Foo has no declared dependencies...' );
+
+
isa_ok(
$schema->resultset('Foo')->result_source,
+++ /dev/null
-package # hide from PAUSE
- ViewDeps::Result::Bar;
-
-use strict;
-use warnings;
-use base qw/ViewDeps::Result::Foo/;
-
-require ViewDeps::Result::Mixin;
-
-__PACKAGE__->table('bar');
-
-__PACKAGE__->result_source_instance->deploy_depends_on(
- ["ViewDeps::Result::Mixin", "ViewDeps::Result::Baz"] );
-
-__PACKAGE__->add_columns( b => { data_type => 'integer' } );
-
-__PACKAGE__->belongs_to(
- 'table',
- 'ViewDeps::Result::JustATable',
- { 'foreign.id' => 'self.b' },
-);
-
-__PACKAGE__->has_many( 'foos', 'ViewDeps::Result::Foo',
- { 'foreign.id' => 'self.id' } );
-
-1;
+++ /dev/null
-package # hide from PAUSE
- ViewDeps::Result::Baz;
-## Used in 105view_deps.t
-
-use strict;
-use warnings;
-use base qw(DBIx::Class::Core);
-
-__PACKAGE__->table('baz');
-
-__PACKAGE__->add_columns( id => { data_type => 'integer' } );
-
-__PACKAGE__->belongs_to(
- 'table',
- 'ViewDeps::Result::JustATable',
- { 'foreign.id' => 'self.b' },
-);
-
-__PACKAGE__->has_many( 'foos', 'ViewDeps::Result::Foo',
- { 'foreign.a' => 'self.id' } );
-
-1;
+++ /dev/null
-package # hide from PAUSE
- ViewDeps::Result::Foo;
-
-use strict;
-use warnings;
-use base qw(ViewDeps::Result::Quux);
-
-__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
-__PACKAGE__->table('foo');
-
-__PACKAGE__->result_source_instance->view_definition(
- "select * from just_a_table");
-
-__PACKAGE__->add_columns(
- id => { data_type => 'integer', is_auto_increment => 1 },
- a => { data_type => 'integer', is_nullable => 1 }
-);
-
-__PACKAGE__->set_primary_key('id');
-
-__PACKAGE__->belongs_to( 'bar', 'ViewDeps::Result::Bar',
- { 'foreign.id' => 'self.a' } );
-
-1;
+++ /dev/null
-package # hide from PAUSE
- ViewDeps::Result::JustATable;
-## Used in 105view_deps.t
-
-use base qw(DBIx::Class::Core);
-
-__PACKAGE__->table('just_a_table');
-
-__PACKAGE__->add_columns(
- id => { data_type => 'integer', is_auto_increment => 1 },
- name => { data_type => 'varchar', size => 255 }
-);
-
-__PACKAGE__->set_primary_key('id');
-
-__PACKAGE__->has_many( 'bars', 'ViewDeps::Result::Bar',
- { 'foreign.b' => 'self.id' } );
-
-1;
+++ /dev/null
-package # hide from PAUSE
- ViewDeps::Result::Mixin;
-## Used in 105view_deps.t
-
-use strict;
-use warnings;
-use base qw(DBIx::Class::Core);
-
-__PACKAGE__->table('mixin');
-
-__PACKAGE__->add_columns(
- id => {
- data_type => 'integer', is_auto_increment => 1, sequence => 'foo_id_seq'
- },
- words => { data_type => 'text' }
-);
-
-__PACKAGE__->set_primary_key('id');
-
-1;
+++ /dev/null
-package # hide from PAUSE
- ViewDeps::Result::Quux;
-
-use strict;
-use warnings;
-use base qw(DBIx::Class::Core);
-
-__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
-__PACKAGE__->table('quux');
-
-__PACKAGE__->result_source_instance->view_definition(
- "select * from quux");
-
-__PACKAGE__->add_columns(
- etc => { data_type => 'text' },
- c => { data_type => 'integer', is_nullable => 1 }
-);
-
-__PACKAGE__->set_primary_key('c');
-
-__PACKAGE__->belongs_to( 'foo', 'ViewDeps::Result::Foo',
- { 'foreign.a' => 'self.c' } );
-
-1;