Ok, that's working! :) I add a session extension that deals with 1 class of my model. There is two way to add an extension (as said on the sqlalchemy mailing) : - in the sessionmaker parameter 'extension' : I can't do this since my model is obviously not define at that time and my extension needs it. - simply append it once the session is defined.
Before I added it in my class 's module. Now I do it in the init_model and works fine! Thanks On Aug 31, 9:32 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > GustaV schrieb: > > > > > Hi all! > > > I have to do some strange things on the session (not scoped) instance > > within my model package. > > To do so "sess = DBSession()" works well apparently. But if > > DBSession() is called somewhere in the model (either the __init__, > > identity or anywhere else) it fails the "paster setup-app" command. > > > sqlalchemy.exc.UnboundExecutionError: Could not locate a bind > > configured on mapper Mapper|Permission|tg_permission or this Session > > > It looks like a lake of coherence in the actual Session instance... > > > The issue comes up for setup-app, but the other uses work fine. > > > Does anyone can reproduce this? > > This is due to the new SA-setup. The Session doesn't have a bind until > init_model is called. > > And I don't consider that a bug - I wonder what your model needs to do > in the DB while actually being defined? > > Diez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

