The Oracle driver no longer lowercases table names from the catalog, and
these names are normalized to upper case. The main common tests alias
the lowercase table names for the monikers and classes hashes for this
case; this commit adds the same code to the t/backcompat/0.04006 common
tests (in lib/dbixcsl_common_tests.pm .)
my $monikers = {};
my $classes = {};
foreach my $source_name ($schema_class->sources) {
- my $table_name = $schema_class->source($source_name)->from;
+ my $table_name = $schema_class->loader->moniker_to_table->{$source_name};
+
+ my $result_class = $schema_class->source($source_name)->result_class;
+
$monikers->{$table_name} = $source_name;
- $classes->{$table_name} = $schema_class . q{::} . $source_name;
+ $classes->{$table_name} = $result_class;
+
+ # some DBs (Firebird, Oracle) uppercase everything
+ $monikers->{lc $table_name} = $source_name;
+ $classes->{lc $table_name} = $result_class;
}
# for debugging...
$monikers->{$table_name} = $source_name;
$classes->{$table_name} = $result_class;
- # some DBs (Firebird) uppercase everything
+ # some DBs (Firebird, Oracle) uppercase everything
$monikers->{lc $table_name} = $source_name;
$classes->{lc $table_name} = $result_class;
}