Hi,

I tried to use rumdemo [1] together with Elixir 0.6. Unfortunately, this
failed. rumdemo is a GSOC project which build a simple CRUD interface from
model objects (currently only sqlalchemy.orm is tested).

Every time I try to create a new record, I get an exception like this:
InvalidRequestError: Object '[EMAIL PROTECTED]' is already attached to
session '140197006645200' (this is '140197006629392')

Yes, I know probably nobody ever tried to use rumdemo with Elixir and I'm
prepared to write some code myself.

I think the problem is that Elixir adds all new entities to the global session.

The tutorial says:
Elixir provides a default global contextual (thread-local) session for you
to use, and Elixir entities are by default linked to that session by using
that session's contextual mapper. It just means that whenever you create an
instance of any of your entities, that instance is automatically added
(saved) to the session. If you want to use another session (for example, to
not use a global/contextual session at all), that's fine, you just need to
tell Elixir by using the corresponding option.

How can I do that (tell Elixir not to use the global session but one that I provide at entity creation time)?

fs

[1] http://rumdemo.toscawidgets.org/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to