Subject: | 'Failure to reload class' $schema::set_primary_key(): No such column. |
When attempting to create a schema for an MSSQL database with upper case
column names then 'make_schema_at' fails with an error message like
this:
Ep::Schema::Result::B->table("B");
Ep::Schema::Result::B->add_columns(
"b_id",
{ data_type => "integer", is_nullable => 0 },
"b",
{ data_type => "nvarchar", is_nullable => 1, size => 50 },
);
Ep::Schema::Result::B->set_primary_key("B_ID");
Failed to reload class Ep::Schema::Result::B:
DBIx::Class::ResultSourceProxy::set_primary_key(): No such column B_ID
on table B at
C:\Users\rattrill.EOL\AppData\Local\Temp\dbic_yh5/Ep/Schema/Result/B.pm
line 56
Compilation failed in require at (eval 111) line 2.
This appears to be caused by a mismatch in case between the column names
passed to add_columns (lower case) and to set_primary_key (upper case).
This problem was not present in version 0.07010.
I have attached an archive with files that may be useful in reproducing
the problem including some basic DDL and a simple test script.
I am running Strawberry Perl 5.14.2 on Windows.
My DBD driver is DBD::ADO $VERSION = '2.99'.
Thank you for providing this module.
Subject: | DBIx_Class_Schema_Loader_ColumnCase.zip |
Message body not shown because it is not plain text.