Dear all,
I'm new to using SQLObject, and having some problems with getting it
to recognise my current MySQL database.
I've set up my connection fine, but it won't recognise the names of
the columns (presumably because they're not written using the default
naming convention?). For example, one of my columns is an acronym, so
is 3 uppercase letters. I've tried the following:
class Table1(sqlobject.SQLObject):
_connection = conn
_fromDatabase = True
class sqlmeta:
table = 'Table1'
idName = 'Table1ID'
BOB = StringCol()
print Table1.get(1)
this gives the result
Unknown column 'bo_b' in 'field list'
So, specifically a few questions:
I've seen the attribute in class sqlmeta of 'columns' - will this find
my column names automatically, or do I still need to input them
manually? If the latter..:
I assume I set the names of each column in the instance of sqlmeta
(like I have done with the table name) - how do I do this?! Do I do
this before or after I've told SQLObject that the BOB column is a
String column?
Is there a published list of the default naming convention that
SQLObject follows? I couldn't find it on the website.
Thanks in advance for any help anyone is able to give.
Chris
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss