Skip Menu |

This queue is for tickets about the Class-DBI-Loader-DB2 CPAN distribution.

Report information
The Basics
Id: 17910
Status: open
Priority: 0/
Queue: Class-DBI-Loader-DB2

People
Owner: Nobody in particular
Requestors: joerg.braun [...] lbs-it.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.14
Fixed in: (no value)



Subject: Does not find primary keys
File Class/DBI/Loader/DB2.pm, sub _load_classes extracts all tables with $dbh->tables( { 'TABLE_TYPE' => 'TABLE' } ). This returns with schema and tablename enclosed in " (e.g. "SCHEMA"."TABNAME"). The split does not remove the " and the query for keycolumns fails. I use a test fix, I inserted one line: $table =~ s/"//g; # <<< inserted by me my ($tabschema,$tbl) = split '\.', $table; # original line This is perl, v5.8.7 built for MSWin32-x86-multi-thread Binary build 815 [211909] provided by ActiveState. DB2 Version 8.2, FP3 Personal Edition
From: joerg.braun [...] lbs-it.de
I forgot: On Mi. 01. Mär. 2006, 02:30:39, guest wrote: Show quoted text
> I use a test fix, I inserted one line: > $table =~ s/"//g; # <<< inserted by me > my ($tabschema,$tbl) = split '\.', $table; # original line
Test stills fails, as it generates wrong class, trying to work this out: not ok 1 # Failed test in t/01-basic.t at line 76. # got: 'Db2adminTeste' # expected: 'Db2admin.teste'
On Mi. 01. Mär. 2006, 02:33:17, guest wrote: Show quoted text
> Test stills fails, as it generates wrong class, trying to work this > out: > > not ok 1 > # Failed test in t/01-basic.t at line 76. > # got: 'Db2adminTeste' > # expected: 'Db2admin.teste'
Test has to be fixed in file t/01-basic.t at line 73. from: $subclass =~ s/_(\w)/ucfirst($1)/eg; to: $subclass =~ s/[_.](\w)/ucfirst($1)/eg; The schema and table are seperated by a '.'. The dot is only replaced in alias names with an underscore.