#4 SQLite table name mismatch

closed
nobody
None
5
2005-10-04
2005-09-29
Anonymous
No

Hello,

I am fairly new to python and SQLObject. I have been
asked to resurrect some code and have been having a
reoccurring problem: as near as I can tell, the column
name to object name translation intermittently
mismatches (omits/adds a _ in middle of name before a
capital.)

EG
For relationItem in table.relationThing:
Print relationItem
Will consistently generate a “database error “no such
column: relation_thing_id ””. The column is named
relationthing_id. The tables are generated form the
classes, and have a consistent naming schema for
foreign keys. All other times this relation is
referenced, it generates the right table name.

I have spent a few weeks trying combinations of
different versions of python (2.3 and 2.4), pysqlite
(2.0.4, 1.1.6, 1.0), sqlite (2.8, 3.2.5) and OS (winXP,
SuSE, Debian) and have not had any success elevating
this problem. The code ran at one point, but the box
that it was running on has since been formatted. I
have also tried the SQLObject version 7 with same
results. These configurations pass the regression testing.

This looks to be an amazing tool, and I would like to
include it in future projects, provided that I can get
it working.

Any help would be welcome,
matt inthefrist@hotmail.com

Discussion

  • Nobody/Anonymous

    Logged In: NO

    FYI: found a work around. if you use _table to name your
    tables, it seams to work fine...

    matt

     
  • Oleg Broytman

    Oleg Broytman - 2005-10-04
    • status: open --> closed
     

Log in to post a comment.