Thanks Gaetan,

> Well that global (ie provided by default) collection, session and
> metadata was a poor design decision and this is one of the numerous
> problems it brings. At some point, I should really think things
> through and see how to get rid of them with minimal upgrade hassle.

I'd be interested to see what you come up with...

> > Neither do we want to be
> > dependent on when what gets imported...
>
> Well, that's the only semi-clean (IMO) option currently available.

The problem is that we don't always have control over that. And, it is
such an unintuitive place to look for problems. Such a secondary
impact of import order is almost invisible in a way.  For me the
logical place to do something about it feels like setup_all (or
something analogous to it)?

We're doing the following now (before setup_all):

elixir.session.configure(autoflush=True, transactional=True)
elixir.session.registry.scopefunc = custom_scope_func

Which seems to be working... although I am uncomfortable fiddling with
the session internals: .registry and its .scopefunc.  And, I'm worried
that there are more internal bits I have missed, or that may be
changed in future.  Nevertheless, I've decided that I'd rather do this
than try to "move" the Entities from one ScopedSession to another.

Thanks
- i
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to