Re: [SQLObject] Generic "find" & findOne method
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ma...> - 2004-12-21 16:54:21
|
On Tue, Dec 21, 2004 at 02:43:38PM -0200, Carlos Ribeiro wrote: > findOne returns a single record. It raises an exception if no item is > found. If more than one item is found, it returns the first one Which one? Just random? Is there "orderBy" in findOne? > If this code is useful, I can contribute a patch back to SQLObject. It > involves simple modifications on dbconnection.py and main.py. Why dbconnection? Seems like a trivial addition in main.py - just process the dictionary to generate appropriate WHERE clause, and call self.select(). Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |