|
From: Oleg B. <ph...@ph...> - 2004-04-23 14:48:51
|
Hello.
How can I orderBy using table.q.attribute magic?
patients = Patient.select(None, orderBy=-Patient.q.registrationTime)
Traceback (most recent call last):
[snip]
File "/usr/local/lib/python2.3/site-packages/SQLObject/SQLObject.py", line 1068, in select
connection=connection)
File "/usr/local/lib/python2.3/site-packages/SQLObject/SQLObject.py", line 1235, in __init__
orderBy = self._mungeOrderBy(orderBy)
File "/usr/local/lib/python2.3/site-packages/SQLObject/SQLObject.py", line 1246, in _mungeOrderBy
if self.sourceClass._SO_columnDict.has_key(orderBy):
TypeError: unhashable instance
SQLObject 0.5.2 with inheritance patch.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|