On May 10, 9:33 am, "Gaetan de Menten" <[EMAIL PROTECTED]> wrote:
> On 5/10/07, zopyx01 <[EMAIL PROTECTED]> wrote:
>
>
>
> > I integrated Elixir into z3c.sqlalchemy for defining models using
> > entities. This works fine for now!
> > z3c.sqlalchemy has an internal registery that maps names to either SA
> > mappers or Elixir entities.
>
> > Within a Zope thread - each one having its own SA session -
> > z3c.sqlalchemy need to rebind the
> > entity to the current session. For this purpose I create a deepcopy()
> > of the registered entity
> > and bind the session to the entity copy.
>
> This seem really weird. But let's be clear... When you are talking
> about entities, are you talking about classes or about instances? I'm
> assuming you are talking about the classes. Instances are not
> thread-safe.

I think my approach is nonsense.

So what would be the approach to use an entity within a threaded
environment where
every thread has its own session.

Andreas


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