really sorry to ask once more. when i now try using this, i get:
TypeError: select() takes exactly 1 argument (2 given)

you know why?


On Jan 17, 2008 5:33 PM, Oleg Broytmann <[EMAIL PROTECTED]> wrote:

> On Thu, Jan 17, 2008 at 05:02:34PM +0100, Frank Wagner wrote:
> > yes, this sounds exactly like what i need.
> >
> > I inserted it, but it doesn??t work - i??m really sorry but can you help
> me
> > out?
> >
> > class Reisen(SQLObject):
> >     class sqlmeta:
> >         idName="NR"
> >     REISENR        = StringCol(length=20, alternateID=True,
> > dbName="REISENR") #CHAR(20)
> >     def select(self, **kw):
> >         sresult = SQLObject.select(self, **kw)
> >         return sresult.filter(NOT(LIKE(Reisen.q.REISENR, "BUS%")))
> >
> > i get an error: "TypeError: unbound method select() must be called with
> > Reisen instance as first argument"
>
>   Sorry, minor fault. .select() is a class method!
>
> class Reisen(SQLObject):
>   ...
>    def select(cls, **kw):
>        sresult = SQLObject.select(cls, **kw)
>      ...
>   select = classmethod(select)
>
> 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

Reply via email to