use Carp::Clan qw/^DBIx::Class/;
use Class::C3;
-our $VERSION = '0.04999_10';
+our $VERSION = '0.04999_12';
=head1 NAME
$self->next::method(@_);
my $dbh = $self->schema->storage->dbh;
- $self->{db_schema} ||= $dbh->selectrow_array('SELECT USER FROM DUAL', {});
+
+ my ($current_schema) = $dbh->selectrow_array('SELECT USER FROM DUAL', {});
+
+ $self->{db_schema} ||= $current_schema;
+
+ if (lc($self->db_schema) ne lc($current_schema)) {
+ $dbh->do('ALTER SESSION SET current_schema=' . $self->db_schema);
+ }
}
=head1 AUTHOR
-TSUNODA Kazuya C<drk@drk7.jp>
+See L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
+
+=head1 LICENSE
-Dagfinn Ilmari Mannsåker C<ilmari@ilmari.org>
+This library is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.
=cut