If I have to do this flush() (in my constructor for that Entity, I guess) then that's fine. It's just weird that I haven't seen such a thing in any other application's models.
I'll need to conditionalize my inclusion of TurboGears - I don't want to have to suck in all of TurboGears when I use my model.py within my CORBA server context. So I shall make elixir.session be set to either my own (transactional=True, autoflush=False) session maker in my CORBA server, or the TurboGears defined one in my TurboGears server. Thanks again, Jonathan. Cheers, Luke -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan LaCour Sent: 05 March 2008 17:26 To: [email protected] Subject: [TurboGears] Re: Sessions with Elixir both in and outside of TurboGears > The problem I'm getting seems to hinge on the fact that I need to > grab from my Entity the auto-incrementing primary key Field that > is generated from the database. I use this as a publicly-visible > identifier. I have tried a whole slew of combinations of stuff, > and none of them seems satisfactory. Oh, and one more thing. Since the TurboGears default session is transactional, you'll likely need to do a flush() manually on the instance itself to get the generated primary key. Good luck. -- Jonathan LaCour http://cleverdevil.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

