Subject: | Generated sql causing syntax errors with mysql |
Date: | Tue, 4 Mar 2014 16:30:58 -0800 |
To: | bug-DBIx-DataModel [...] rt.cpan.org |
From: | James Switzer <jswitzer [...] shastaqa.com> |
This may actually be a bug in SQL::Abstract::More, but DBIx::DataModel is
currently what is exposing it. I've been using DBIx::DataModel with a
sqlite database and am currently in the process in moving it over to being
backed by mysql. I have run into a problem where a column name "Key" that
was fine with sqlite does not work with mysql because it is a reserved
word. As far as I can tell there is no way in DBIx::DataModel or
SQL::Abstract::More to enable the quoting of table and column identifiers.
It would be nice if this was possible.
DBIx-DataModel-2.42
perl, v5.10.1
Darwin SQA-MAC-29.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23
16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
OSX 10.7.5
UPDATE Config SET Value = ? WHERE ( Key = ? ) / 1393977913, account_ts at
XXX/Account/010_Create.t line 20.
DBD::mysql::st execute failed: You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'Key = 'account_ts' )' at line 1 at
/Users/QATesting/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/DBIx/DataModel/ConnectedSource.pm
line 286.