[sqlalchemy] Re: sorting by members

2008-09-20 Thread Michael Bayer
On Sep 20, 2008, at 7:59 AM, m.talaee wrote: > > hi all > i need to sort users by number of their friends. > there is many to many relation table between user table and itself. > order_by don't support ordering (or i couldn't find). > please help me for a mapping like: mapper(User, users, prop

[sqlalchemy] Re: Problem with Session Rollback

2008-09-20 Thread Michael Bayer
On Sep 20, 2008, at 1:53 PM, Mariano Cortesi wrote: > Hi, > > I'm having a problem with session rollback. > > I have a block something like: > > def f(): > try: > #do some queries with session > self.session.commit() > except Exception, e: > self.session.rollback() > rais

[sqlalchemy] Re: Problem with Session Rollback

2008-09-20 Thread az
rollback is not reverting your own changes to the objects. u have to do fix it youself. can that be? On Saturday 20 September 2008 20:53:33 Mariano Cortesi wrote: > Hi, > > I'm having a problem with session rollback. > > I have a block something like: > > def f(): > try: > #do some querie

[sqlalchemy] Problem with Session Rollback

2008-09-20 Thread Mariano Cortesi
Hi, I'm having a problem with session rollback. I have a block something like: def f(): try: #do some queries with session self.session.commit() except Exception, e: self.session.rollback() raise the function that calls f() catchs de exception a do another transactional

[sqlalchemy] Re: Forks() and Alchemy

2008-09-20 Thread Mariano Cortesi
Cono On 20/09/2008, at 01:21, "Bobby Impollonia" <[EMAIL PROTECTED]> wrote: > > If you have a session and then you fork, the child process is going to > try to use the same session but that won't work because connections > can't be floated across processes. If you call dispose() on the engine

[sqlalchemy] sorting by members

2008-09-20 Thread m.talaee
hi all i need to sort users by number of their friends. there is many to many relation table between user table and itself. order_by don't support ordering (or i couldn't find). please help me --~--~-~--~~~---~--~~ You received this message because you are subscrib

[sqlalchemy] ordering_list performance

2008-09-20 Thread jean-philippe dutreve
Below is the profiling of code that added 1200 items into an ordering_list relation. I had to bypass the ordering_list stuff for bulk additions in order to have better performance (down to 2 seconds). Hope this post helps to improve this part (using 0.5.0rc1, python 2.5, linux i686, 1.5Go RAM) SA