On Wed, Aug 04, 2010 at 03:50:53AM -0700, Dominic LoBue wrote:
> CREATE TABLE "chrFactions" (
[skip]
>  PRIMARY KEY  ("factionID")
> )
> 
> 
> And here's my definition:
> class chrFactions(SQLObject):
>    class sqlmeta:
>        style = MixedCaseStyle(longID=True)
>        idName = 'factionID'
>        fromDatabase = True
> 
> However SQLObject clearly thinks there's a PRIMARY column for some reason:

   SQLObject's fromDatabase machinery is quite primitive and doesn't
support all of the backend features. In this case it sees the line

>  PRIMARY KEY  ("factionID")

   and decides it is a column. To work around the problem add the following
parameter to SQLiteConnection constructor: use_table_info=True; if you use
DB URIs add '&use_table_info=1'. This switches SQLiteConnection to a
different, more clever parser. In the future I'm going to make that the
default; the switch is at the top of my TODO.

Oleg.
-- 
     Oleg Broytman            http://phd.pp.ru/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to