On Sun, 2002-11-03 at 09:31, Michael Montagne wrote:
> I'm getting this error when called in my browser:
> File "/home/michael/Webware/MyContext/db.py", line 17, in showcats
> File "./MiddleKit/Run/SQLObjectStore.py", line 286, in fetchObjectsOfClass
> File "./MiddleKit/Run/SQLObjectStore.py", line 337, in executeSQL
> File "./MiddleKit/Run/MySQLObjectStore.py", line 46, in _executeSQL
> File "/usr/lib/python2.2/site-packages/MySQLdb/cursors.py", line 61, in execute
> r = self._query(query)
> File "/usr/lib/python2.2/site-packages/MySQLdb/cursors.py", line 168, in _query
> rowcount = self._BaseCursor__do_query(q)
> File "/usr/lib/python2.2/site-packages/MySQLdb/cursors.py", line 112, in __do_query
> OperationalError: (1054, "Unknown column 'UploaddateId' in 'field list'")
> The same file(db.py) works correctly when called from IDLE.
> When I first defined my Classes.csv, I must have capitalized the wrong thing, cause MiddleKit created UploaddateID in the database. Realizing my error I fixed Classes.csv and Samples.csv, regenerated and rebuilt my database. But the error remained. I've since renamed the column to "upload" and removed all references to "uploaddate". But the error still remains.
> To test if it was a cache problem, I used konq instead of galeon. Did not help.
> I'm sure I only have one model of this name.
> Where is the column name being generated?
After regenerating your middlekit classes and re-creating the database,
make sure you also restart the appserver, so that it picks up the change
(just guessing that this might be your problem).
You may want to snoop around in your Middle/GeneratedSQL directory
(which contains the SQL for creating the schema) and the
Middle/GeneratedPy (which contains the base classes for your Middle
classes), too, to ensure that everything is as you expected. It looks
like something is just out-of-sync.