Re: [SQLObject] orderBy table.q.attribute
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Oleg B. <ph...@ph...> - 2004-04-23 17:38:06
|
On Fri, Apr 23, 2004 at 12:04:07PM -0500, Ian Bicking wrote:
> Ah... I found the bug, in _mungeOrderBy; which should look like:
Aha, now it is much better. orderBy="-registration_time" now works!
Thank you.
orderBy=-Patient.q.registrationTime still does not work, though with
a different error:
Traceback (most recent call last):
[snip]
File "/usr/local/lib/python2.3/site-packages/SQLObject/SQLObject.py", line 1381, in __iter__
return conn.iterSelect(self)
File "/usr/local/lib/python2.3/site-packages/SQLObject/DBConnection.py", line 167, in iterSelect
select, keepConnection=False)
File "/usr/local/lib/python2.3/site-packages/SQLObject/DBConnection.py", line 361, in __init__
self.cursor.execute(self.query)
ProgrammingError: ERROR: Unable to identify a prefix operator '-' for
type 'character varying'
You may need to add parentheses or an explicit cast
SELECT ... ORDER BY - patient.registration_time
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|