Bugs item #2865410, was opened at 2009-09-23 20:45
Message generated for change (Tracker Item Submitted) made by bdoms
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2865410&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: SQLObject release (specify)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Brendan Doms (bdoms)
Assigned to: Nobody/Anonymous (nobody)
Summary: createTable Fails When Table is Named "Transaction"
Initial Comment:
Bare bones, just try this (I'm working off of the easy_install version on Ubuntu, which is currently 0.11.0):
from sqlobject import SQLObject, connectionForURI, sqlhub
db_file = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'finance.db')
connection = connectionForURI('sqlite:' + db_file)
sqlhub.processConnection = connection
class Transaction(SQLObject):
pass
Transaction.createTable()
If the table is named anything else (as far as I can find), then it works fine. But as it is, this generates the following error:
File "/usr/local/lib/python2.6/dist-packages/SQLObject-0.11.0-py2.6.egg/sqlobject/sqlite/sqliteconnection.py", line 183, in _executeRetry
raise OperationalError(ErrorMessage(e))
sqlobject.dberrors.OperationalError: near "transaction": syntax error
Not very helpful right? Either this error should be changed to point out the fact that "Transaction" is invalid as a table name, or the preferred solution would be to eliminate the error altogether and allow this table name. Considering that the import list contains no * and nothing called "Transaction" I see no reason why SQLObject's name space should interfere here.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2865410&group_id=74338
|