Full traceback in case anyone's intrested:

Page handler: <bound method Root.index of <sti.controllers.root.Root
object at 0x01564590>>
Traceback (most recent call last):
  File 
"c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\_cphttptools.py",
line 105, in _run
    self.main()
  File 
"c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\_cphttptools.py",
line 254, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in index
  File 
"c:\python24\lib\site-packages\TurboGears-0.9a6-py2.4.egg\turbogears\controllers.py",
line 273, in expose
    output = database.run_with_transaction(
  File 
"c:\python24\lib\site-packages\TurboGears-0.9a6-py2.4.egg\turbogears\database.py",
line 221, in run_with_transaction
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File 
"c:\python24\lib\site-packages\TurboGears-0.9a6-py2.4.egg\turbogears\controllers.py",
line 290, in <lambda>
    mapping, fragment, *args, **kw)))
  File 
"c:\python24\lib\site-packages\TurboGears-0.9a6-py2.4.egg\turbogears\controllers.py",
line 314, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File 
"c:\python24\lib\site-packages\TurboGears-0.9a6-py2.4.egg\turbogears\errorhandling.py",
line 71, in try_call
    return func(self, *args, **kw)
  File "D:\TG-Sites\STI\sti\controllers\root.py", line 19, in index
    childpages = page.child_pages
  File "<string>", line 1, in <lambda>
  File 
"c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1675-py2.4.egg\sqlobject\joins.py",
line 142, in performJoin
    inst.id)
  File 
"c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1675-py2.4.egg\sqlobject\dbconnection.py",
line 600, in _SO_selectJoin
    return self.queryAll("SELECT %s FROM %s WHERE %s = %s" %
  File 
"c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1675-py2.4.egg\sqlobject\dbconnection.py",
line 751, in queryAll
    return self._dbConnection._queryAll(self._connection, s)
  File 
"c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1675-py2.4.egg\sqlobject\dbconnection.py",
line 311, in _queryAll
    self._executeRetry(conn, c, s)
  File 
"c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1675-py2.4.egg\sqlobject\mysql\mysqlconnection.py",
line 60, in _executeRetry
    return cursor.execute(query)
  File "C:\Python24\lib\site-packages\MySQLdb\cursors.py", line 137, in execute
    self.errorhandler(self, exc, value)
  File "C:\Python24\lib\site-packages\MySQLdb\connections.py", line
33, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1054, "Unknown column 'page_id' in 'where clause'")


On 5/16/06, Ed Singleton <[EMAIL PROTECTED]> wrote:
> I want to join a table with itself in the model definition.
>
> Something like:
>
> class Page(SQLObject):
>     parent_page = ForeignKey('Page')
>     child_pages = MultipleJoin('Page')
>
> but when I do, and I try to pull out the child pages I get the error:
>
> OperationalError: (1054, "Unknown column 'page_id' in 'where clause'")
>
> Any clues?
>
> Thanks
>
> Ed
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to