=head2 deploy_depends_on
__PACKAGE__->result_source_instance->deploy_depends_on(
- ["Year","CD"]
+ ["MyDB::Schema::Result::Year","MyDB::Schema::Result::CD"]
);
Specify the views (and only the views) that this view depends on.
-Pass this an array reference of source names.
+Pass this an array reference of fully qualified result classes.
=head1 OVERRIDDEN METHODS
# copy and bump all deps by one (so we can reconstruct the chain)
my %seen = map { $_ => $seen->{$_} + 1 } ( keys %$seen );
- $seen{ $view->source_name } = 1;
+ $seen{ $view->result_class } = 1;
for my $dep ( keys %{ $view->{deploy_depends_on} } ) {
if ( $seen->{$dep} ) {
return {};
}
my ($new_source_name) =
- grep { $view->schema->source($_)->source_name eq $dep }
+ grep { $view->schema->source($_)->result_class eq $dep }
@{ [ $view->schema->sources ] };
my $subdeps =
_resolve_view_deps( $view->schema->source($new_source_name),
"SELECT id,name FROM a_name_artists WHERE name like 'ab%'"
);
__PACKAGE__->result_source_instance->deploy_depends_on(
- ["ANameArtists"]
+ ["ViewDeps::Result::ANameArtists"]
);
__PACKAGE__->add_columns(
__PACKAGE__->result_source_instance->view_definition(
"SELECT id,name FROM ab_name_artists WHERE name like 'aba%'" );
__PACKAGE__->result_source_instance->deploy_depends_on(
- ["AbNameArtists"] );
+ ["ViewDeps::Result::AbNameArtists"] );
__PACKAGE__->add_columns(
id => { data_type => 'integer', is_auto_increment => 1 },
"SELECT aba.id,aba.name,cd.title,cd.year,cd.number_tracks FROM aba_name_artists aba JOIN year_2010_cds_with_many_tracks cd on (aba.id = cd.artist)"
);
__PACKAGE__->result_source_instance->deploy_depends_on(
- ["AbNameArtists","Year2010CDsWithManyTracks"] );
+ ["ViewDeps::Result::AbNameArtists","ViewDeps::Result::Year2010CDsWithManyTracks"] );
__PACKAGE__->add_columns(
id => { data_type => 'integer', is_auto_increment => 1 },
);
__PACKAGE__->result_source_instance->deploy_depends_on(
- ["Year2010CDs"] );
+ ["ViewDeps::Result::Year2010CDs"] );
__PACKAGE__->add_columns(
id => { data_type => 'integer', is_auto_increment => 1 },
"SELECT id,name FROM a_name_artists WHERE name like 'ab%'"
);
__PACKAGE__->result_source_instance->deploy_depends_on(
- ["ANameArtists"]
+ ["ViewDepsBad::Result::ANameArtists"]
);
__PACKAGE__->add_columns(
__PACKAGE__->result_source_instance->view_definition(
"SELECT id,name FROM ab_name_artists WHERE name like 'aba%'" );
__PACKAGE__->result_source_instance->deploy_depends_on(
- ["AbNameArtists", "AbaNameArtistsAnd2010CDsWithManyTracks"] );
+ ["ViewDepsBad::Result::AbNameArtists", "ViewDepsBad::Result::AbaNameArtistsAnd2010CDsWithManyTracks"] );
__PACKAGE__->add_columns(
id => { data_type => 'integer', is_auto_increment => 1 },
"SELECT aba.id,aba.name,cd.title,cd.year,cd.number_tracks FROM aba_name_artists aba JOIN year_2010_cds_with_many_tracks cd on (aba.id = cd.artist)"
);
__PACKAGE__->result_source_instance->deploy_depends_on(
- ["AbNameArtists","Year2010CDsWithManyTracks"] );
+ ["ViewDepsBad::Result::AbNameArtists","ViewDepsBad::Result::Year2010CDsWithManyTracks"] );
__PACKAGE__->add_columns(
id => { data_type => 'integer', is_auto_increment => 1 },
);
__PACKAGE__->result_source_instance->deploy_depends_on(
- ["Year2010CDs"] );
+ ["ViewDepsBad::Result::Year2010CDs"] );
__PACKAGE__->add_columns(
id => { data_type => 'integer', is_auto_increment => 1 },