On May 26, 2010, at 10:10 AM, dhanil anupurath wrote: > Hi, > > Thanks for the quick reply. > In my query i am not using any limit()/offset()/first() > but i am using order by ascending. can "order by" cause an issue??
your stacktrace says you are using "first()": Traceback (most recent call last): File "model/availability.py", line 278, in set_none_state avail=DBSession.query(AvailState).with_lockmode(cls.lockmode).\ File "/root/tg2env/lib/python2.4/site-packages/SQLAlchemy-0.5.6- py2.4.egg/sqlalchemy/orm/query.py", line 1300, in first ret = list(self[0:1]) also SQLA 0.5 has inferior support for Oracle so I would suggest upgrading to 0.6 (the bug fix will only be in 0.6 in any case). the nested queries are because Oracle does not support LIMIT/OFFSET directly. A scheme using ROW NUMBER must be used. That scheme needs to be adjusted to move "FOR UPDATE" to the outside of the query. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.