On Tue, Apr 22, 2008 at 8:27 PM, alexander krohn <[EMAIL PROTECTED]> wrote:

>  the tutorial says:
>  "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."
>
>  can you give more information about the "corresponding option"?

class Person(Entity):
    name = Field(Unicode(64))

    using_options(session=your_session)

See:
http://elixir.ematia.de/apidocs/elixir.options.html

For some more details, and alternatives to setting the session in each entity.

>  i would like to have a simple use like
>  begin()
>  doData()
>  commit() or rollback()
>
>  currently i'm using the global elixir.session in a long-running process.
>  this has some silent data-losses, which is really nasty. i believe it's
>  session or transaction related.
>
>  when i shut down the process i get:
>  Exception exceptions.TypeError: "'NoneType' object is not callable" in
>  <bound method InstanceState.__cleanup of
>  <sqlalchemy.orm.attributes.InstanceState object at 0x4091894c>> ignored
>
>  ... many times, might be all db-objects i've ever loaded while the
>  process lives. this might be an sqlalchemy-issue, but i'm not sure.

Yes, probably. If you can produce a test case, I could investigate it
and tell you for sure, and possibly forward it to SQLAlchemy.

-- 
Gaƫtan de Menten
http://openhex.org

--~--~---------~--~----~------------~-------~--~----~
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