From: Rafael Kitover Date: Fri, 3 Jul 2009 04:34:33 +0000 (+0000) Subject: sybase rels sort of work now, more than half-way through common tests X-Git-Tag: 0.04999_08~2^2~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=948d632b63e9333ce2b2b1446298e14655ad83ea;p=dbsrgits%2FDBIx-Class-Schema-Loader.git sybase rels sort of work now, more than half-way through common tests --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm b/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm index ae2d0ad..600eb77 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm @@ -94,8 +94,7 @@ sub _table_fk_info { while (my $row = $sth->fetchrow_hashref) { my $fk = $row->{fk_name} || -'fk_'.$row->{fktable_qualifier}.'_'.$row->{fktable_owner}.'_' -.$row->{fktable_name}.'_'.$row->{fkcolumn_name}; +'fk_'.$row->{fktable_name}.'_'.$row->{pktable_name}; push @{$local_cols->{$fk}}, $row->{fkcolumn_name}; push @{$remote_cols->{$fk}}, $row->{pkcolumn_name}; diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index 669f135..a2e4996 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -401,7 +401,10 @@ sub test_schema { ok($class6->column_info('loader_test2_id')->{is_foreign_key}, 'Foreign key detected'); ok($class6->column_info('id')->{is_foreign_key}, 'Foreign key detected'); - ok($class6->column_info('id2')->{is_foreign_key}, 'Foreign key detected'); + + my $id2_info = eval { $class6->column_info('id2') } || + $class6->column_info('Id2'); + ok($id2_info->{is_foreign_key}, 'Foreign key detected'); # fk that references a non-pk key (UNIQUE) my $obj8 = $rsobj8->find(1);