On Jan 25, 2008 9:18 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Jan 25, 2008, at 2:02 PM, Kumar McMillan wrote: > > > > > On Jan 25, 2008 11:58 AM, Michael Bayer <[EMAIL PROTECTED]> > > wrote:
> >> > >> The Session.mapper function is not worth it, in my opinion, it exists > >> due to the sheer popularity of its previous incarnation, > >> "assign_mapper". I much prefer keeping things explicit. > > > > I can understand that. I am trying to get this working for an > > application that has its entire model declared in Elixir already. I > > like how easy Elixir is and so I'd rather not abandon that layer. > > But, there is probably a way to configure Elixir for > > save_on_init=False, I will give it a go. You can provide your own session (configured as you wish) to Elixir. Only the default provided session (it's there for your convenience only but you can perfectly not use it) use Session.mapper (and hence the save_on_init thing). > elixir shouldn't be dependent on Session.mapper, if it is, I would > advise the elixir folks change that requirement ASAP. in my view, at > this point elixir should be for mapper configuration only; after that > it should hand off to straight SQLAlchemy for normal runtime operation > with any kind of Session configuration; else its just getting in the > way. As I said above, it is not anymore (it used to be dependent on assign_mapper), but I changed it to support any kind of session (in version 0.3 I think). The only thing, is that we still provide a default session, which is based on Session.mapper, for convenience and backward compatibility. Maybe we should state more prominently in the Elixir doc that this is only a default session and that you can use any session you like. -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---