On Wed, Sep 30, 2009 at 16:57, Michael Bayer <mike...@zzzcomputing.com> wrote:
>
> Gaetan de Menten wrote:

>> I've been trying to work around the Session.mapper deprecation warning
>> in Elixir by providing the same functionality within Elixir. The
>> question is whether _ScopedExt is considered deprecated too ? I guess
>> it is but want to make sure to not duplicate code needlessly...
>
> Yeah that would be part of it.
>
> I was going to advise that you make your extension call the original init
> first, *then* add to the session,

This is what I've come up with anyway...

> since most issues are related to the
> current ordering.

FWIW, I indeed had errors in our test suite when trying to add the
instance to the session before doing the original init. These were all
inheritance tests IIRC. The "add to the session afterwards" does not
seem to produce any obvious errors. I can only hope there are no
subtle ones either...

> This is still doable, but if you are using the
> "init_instance" events we have, it seems like those are hardwired to
> trigger the event before the old initializer runs.  hmm.  Although, the
> reverse ordering may have just as many issues and even the same ones, as
> the object can be added to the session via cascades and similar.

Thanks for the insight,
-- 
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to