my @components = @{shift @_};
# this generation of class bit needs to go into CCC
- my $class = $self->resultset_class . '::' . rand(100);
+ my $class = $self->resultset_class . "::WITH::" . join ("::", @components);
Class::C3::Componentised->inject_base($class, $self->resultset_class);
$self->resultset_class($class);
--- /dev/null
+package A::MoarUselessRSLoader;
+
+use Class::C3::Componentised::LoadActions;
+
+AFTER_APPLY { $_[0]->result_source_instance->inject_resultset_components(['+A::MoarUseless']) };
+
+1;
);
__PACKAGE__->many_to_many('artworks', 'artwork_to_artist', 'artwork');
-__PACKAGE__->result_source_instance->inject_resultset_components(['+A::Useless']);
+__PACKAGE__->result_source_instance->inject_resultset_components(['+A::Useless', '+A::MoarUseless']);
sub sqlt_deploy_hook {
my ($self, $sqlt_table) = @_;
use lib qw(t/lib);
use DBICTest;
-
+use Data::Dumper;
my $schema = DBICTest->init_schema;
isa_ok $schema->resultset('Artist'), 'A::Useless', 'Artist RS';
ok !$schema->resultset('CD')->isa('A::Useless'), 'CD RS is not A::Useless';
+my @classes = ('DBICTest::BaseResultSet::WITH::+A::Useless::+A::MoarUseless',
+ 'A::Useless',
+ 'A::MoarUseless',
+ 'DBICTest::BaseResultSet',
+ 'DBIx::Class::ResultSet',
+ 'DBIx::Class',
+ 'DBIx::Class::Componentised',
+ 'Class::C3::Componentised',
+ 'Class::Accessor::Grouped');
+warn "classes: " . Dumper \@classes;
+
+is_deeply(mro::get_linear_isa(ref $schema->resultset('Artist')), \@classes, 'Proper ISA Stack Order');
+
isa_ok $schema->resultset('Employee'), 'A::Useless', 'Employee RS';
done_testing;