Subject: | FIX to ignore quotes in quoted table names (when using mysql). |
# This is the original sub:
sub get_tables {
my $self = shift;
$self->{tables} ||= [ $self->get_dbh->tables ];
return @{ $self->{tables} };
}
# This is the new sub:
sub get_tables {
my $self = shift;
$self->{tables} ||= [ map { s/^`|`$//g; $_; } $self->get_dbh->tables
];
return @{ $self->{tables} };
}
It seems that DBD::mysql (at least the version I'm using) returns
quoted table names. Without the fix, relations are not found.
B.t.w. this could be set as a new() constructor option along with
perhaps other things as ignoring case when trying to find relations.