On Thu, Jan 17, 2008 at 04:10:17PM +0100, Frank Wagner wrote: > I would like to put a certain where-condition to a class of mine, so that to > every select against that table my condition is added. I think this must be > put within the class-definition.
I think you you'd want to override .select(). Something like this: class MyTable(SQLObject): def select(self, **kw): sresult = SQLObject.select(self, **kw) return sresult.filter(additional_clause) Please note that .select() returns an instance of SelectResults class which you further filter with its .filter() method, and then return the new instance to the caller. Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss