sybase rels sort of work now, more than half-way through common tests
Rafael Kitover [Fri, 3 Jul 2009 04:34:33 +0000 (04:34 +0000)]
lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm
t/lib/dbixcsl_common_tests.pm

index ae2d0ad..600eb77 100644 (file)
@@ -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};
index 669f135..a2e4996 100644 (file)
@@ -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);