Skip Menu |

This queue is for tickets about the DBIx-Class-Schema-Loader CPAN distribution.

Report information
The Basics
Id: 75805
Status: resolved
Priority: 0/
Queue: DBIx-Class-Schema-Loader

People
Owner: Nobody in particular
Requestors: ross.attrill [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.07017
Fixed in: (no value)

Attachments


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
Download DBIx_Class_Schema_Loader_ColumnCase.zip
application/x-zip-compressed 6.6k

Message body not shown because it is not plain text.

Fixed in 0.07019, tested with your DDL files, thank you very much for those by the way. Reopen this ticket if you still have any issues. By the way, it's very interesting that you are using DBD::ADO and MSSQL with DBIx::Class. I originally wrote the DBIx::Class driver for MSSQL over DBD::ADO a couple years ago and your ticket inspired me to revisit it. I am finishing up some improvements for the driver, including transaction support, and it will hopefully be in the next release of DBIx::Class. If you don't mind, please send me a note at rkitover@prismnet.com about your experiences of using DBD::ADO and DBIx::Class, thank you!