[SQLObject] DBconnection SQL generation error?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: charles b. <li...@st...> - 2004-03-22 09:01:26
|
I think there might be a problem with the way DBConnection generates some SQL queries. Specifically, when using SQLObject's createTable function on a table with a column named "key", mysql will throw an exception since the generated SQL does not back quote the names of items. CREATE TABLE table_name ( id INT PRIMARY KEY AUTO_INCREMENT, value VARCHAR(255) NOT NULL UNIQUE, key VARCHAR(255) NOT NULL UNIQUE ) should probably be: CREATE TABLE `table_name` ( `id` INT PRIMARY KEY AUTO_INCREMENT, `value` VARCHAR(255) NOT NULL UNIQUE, `key` VARCHAR(255) NOT NULL UNIQUE ) I haven't had a chance to investigate further, but I wanted to throw it out there before I forgot. Thanks! -Charles |