[sqlalchemy] Re: UniqueObject recipe and turbogears

2007-06-19 Thread King Simon-NFHD78
ts, and see if you can get the same failure. Simon -Original Message- From: sqlalchemy@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kris Sent: 18 June 2007 20:48 To: sqlalchemy Subject: [sqlalchemy] Re: UniqueObject recipe and turbogears I agree with your summary, I also noted that

[sqlalchemy] Re: UniqueObject recipe and turbogears

2007-06-18 Thread kris
I agree with your summary, I also noted that sqlalchemy doesn't really like to have objects that are linked together and in different sessions. I tried using hash_key = (session.context, name), but this failed in the same way. Loading the code with log statement, I note that some object are loade

[sqlalchemy] Re: UniqueObject recipe and turbogears

2007-06-18 Thread King Simon-NFHD78
I'm not using the recipe, so I could be completely wrong about this, but here goes: The EntitySingleton metaclass stores already-constructed instances in a class-level WeakValueDictionary attribute. This will be shared between threads. When you create your UniqueName object, it looks in that Weak