if $temp_loader->schema_base_class;
$self->load_components(@components);
- }
- # This hack is necessary if we changed @ISA of $self through ->load_components.
- {
+ # This hack is necessary because we changed @ISA of $self through
+ # ->load_components.
no warnings 'redefine';
local *connection = subname __PACKAGE__.'::connection' => sub {
$self = $self->connection(@_);
}
+ else {
+ $self = $self->next::method(@_);
+ }
my $class = ref $self || $self;
if(!$class->_loader_invoked) {
Base class for your schema classes. Defaults to 'DBIx::Class::Schema'.
+B<WARNING>: if you define schema_base_class for a dynamic schema, you cannot
+define a L<connection|DBIx::Class::Schema/connection> method in your schema
+class, it must be in the schema base class, due to the limits of L<mro>.
+
+=head2 schema_components
+
+List of components to load into the Schema class.
+
+B<WARNING>: if you define schema_components for a dynamic schema, you cannot
+define a L<connection|DBIx::Class::Schema/connection> method in your schema
+class, it must be in L</schema_base_class> or a component, due to the limits of
+L<mro>.
+
=head2 result_base_class
Base class for your table classes (aka result classes). Defaults to
List of additional classes which all of your table classes will use.
-=head2 schema_components
-
-List of components to load into the Schema class.
-
=head2 components
List of additional components to be loaded into all of your Result