Hi Oleg,

thanks again for your help.

that works smoothly now, but i´m getting another error now:


Whenever i use
Reisen.select(/*ANY CLAUSE*/)

there comes this error:
Traceback (most recent call last):
  File "<console>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/SQLObject-0.9.3-py2.4.egg/sqlobject/sresults.py", line 156, in __getitem__
    return list(self.clone(start=start, end=start+1))[0]
  File "/usr/lib/python2.4/site-packages/SQLObject-0.9.3-py2.4.egg/sqlobject/sresults.py", line 162, in __iter__
    return iter(list(self.lazyIter()))
  File "/usr/lib/python2.4/site-packages/SQLObject-0.9.3-py2.4.egg/sqlobject/sresults.py", line 169, in lazyIter
    conn = self._getConnection()
  File "/usr/lib/python2.4/site-packages/SQLObject-0.9.3-py2.4.egg/sqlobject/sresults.py", line 45, in _getConnection
    return self.ops.get('connection') or self.sourceClass._connection
  File "/usr/lib/python2.4/site-packages/SQLObject-0.9.3-py2.4.egg/sqlobject/dbconnection.py", line 973, in __get__
    return self.getConnection()
  File "/usr/lib/python2.4/site-packages/SQLObject-0.9.3-py2.4.egg/sqlobject/dbconnection.py", line 985, in getConnection
    raise AttributeError(
AttributeError: No connection has been defined for this thread or process

Sorry for bothering you.

Regards,
Frank



On Jan 28, 2008 8:20 PM, Oleg Broytmann <phd@phd.pp.ru> wrote:
On Mon, Jan 28, 2008 at 08:13:05PM +0100, Frank Wagner wrote:
>     @classmethod
>     def select(cls, clause=None, **kw):
>         sresult = SQLObject.select(cls, clause, **kw)
>         return sresult.filter(~ LIKE(Reisen.q.REISENR, "BUS%"))

  My mistake. In
sresult = SQLObject.select(cls, clause, **kw)
  I'm passing two different cls to SQLObject.select(). Try this:
sresult = SQLObject.select(clause, **kw)

Oleg.
--
    Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
          Programmers don't die, they just GOSUB without RETURN.