Daniel Fetchinson fetchinson at googlemail.com
Mon Sep 28 22:41:27 CEST 2009

> 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.

The current maintainer of sqlobject is Oleg Broytmann and he
frequently answers support questions on the sqlobject mailing list so
it's best to ask questions such as these over there:


Psss, psss, put it down! - http://www.cafepress.com/putitdown

More information about the Python-list mailing list