X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2Fmysql.pm;h=4d1bee88214babe580d4884b589870443e5811c8;hb=18eb280f9b71785a12c105299f813358faa47143;hp=b4743369360ae87f4341afc1f0b317074c1839d5;hpb=ba3e8f029d095ad9c6dc056ba053c0ef64616afe;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm index b474336..4d1bee8 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm @@ -11,7 +11,7 @@ use Try::Tiny; use namespace::clean; use DBIx::Class::Schema::Loader::Table (); -our $VERSION = '0.07010'; +our $VERSION = '0.07018'; =head1 NAME @@ -143,7 +143,7 @@ sub _table_fk_info { sub _mysql_table_get_keys { my ($self, $table) = @_; - if(!exists($self->{_cache}->{_mysql_keys}->{$table})) { + if(!exists($self->{_cache}->{_mysql_keys}->{$table->sql_name})) { my %keydata; my $sth = $self->dbh->prepare('SHOW INDEX FROM '.$table->sql_name); $sth->execute; @@ -158,10 +158,10 @@ sub _mysql_table_get_keys { @{$keydata{$keyname}}; $keydata{$keyname} = \@ordered_cols; } - $self->{_cache}->{_mysql_keys}->{$table} = \%keydata; + $self->{_cache}->{_mysql_keys}->{$table->sql_name} = \%keydata; } - return $self->{_cache}->{_mysql_keys}->{$table}; + return $self->{_cache}->{_mysql_keys}->{$table->sql_name}; } sub _table_pk_info {