[sqlalchemy] Re: refresh() with scoped_session ?

2007-08-09 Thread Alexandre CONRAD
Michael Bayer wrote: I've implemented all the missing class-level methods on ScopedSession in r3212, so you should be able to call refresh(). Great, thanks. I'll check this out. But also, if you want to say Session(), then work with it, that is also the intended usage model, although

[sqlalchemy] Re: refresh() with scoped_session ?

2007-08-09 Thread Alexandre CONRAD
Alexandre CONRAD wrote: Don't forget to answer my question: What are the benefits of instantiating a Session object ?. Actually, I just feel better working *with* a instantiated object. Hey, I just set my code to instantiate the session, and I get the following error when I delete a

[sqlalchemy] Re: refresh() with scoped_session ?

2007-08-09 Thread Michael Bayer
On Aug 9, 2007, at 3:59 AM, Alexandre CONRAD wrote: But also, if you want to say Session(), then work with it, that is also the intended usage model, although the Session.xxx methods should in theory be all you need. Why should I instantiate session = Session() if everything off the

[sqlalchemy] Re: refresh() with scoped_session ?

2007-08-09 Thread Michael Bayer
On Aug 9, 2007, at 4:12 AM, Alexandre CONRAD wrote: Alexandre CONRAD wrote: Don't forget to answer my question: What are the benefits of instantiating a Session object ?. Actually, I just feel better working *with* a instantiated object. Hey, I just set my code to instantiate the

[sqlalchemy] Re: refresh() with scoped_session ?

2007-08-09 Thread Alexandre CONRAD
Michael Bayer wrote: Hey, I just set my code to instantiate the session, and I get the following error when I delete a client (which has a bunch of cascading all, delete-orphan rules). session = Session() NB: I've mapped the session.delete function to my model object for convenience:

[sqlalchemy] Re: refresh() with scoped_session ?

2007-08-09 Thread Michael Bayer
On Aug 9, 2007, at 11:43 AM, Alexandre CONRAD wrote: So I prepared a test case in a single file, but it works in both cases. My problem is in my Pylons app, and I suspect that the dispersed modules doing imports are making some trouble (session instantiated in a module, then

[sqlalchemy] Re: refresh() with scoped_session ?

2007-08-08 Thread Michael Bayer
hi alexandre - I've implemented all the missing class-level methods on ScopedSession in r3212, so you should be able to call refresh(). But also, if you want to say Session(), then work with it, that is also the intended usage model, although the Session.xxx methods should in theory be