[sqlalchemy] Re: a way to share Session.mapper(SomeObject) across two scoped sessions?

2008-01-30 Thread Gaetan de Menten
On Jan 25, 2008 9:18 PM, Michael Bayer [EMAIL PROTECTED] wrote: On Jan 25, 2008, at 2:02 PM, Kumar McMillan wrote: On Jan 25, 2008 11:58 AM, Michael Bayer [EMAIL PROTECTED] wrote: The Session.mapper function is not worth it, in my opinion, it exists due to the sheer popularity of

[sqlalchemy] Re: a way to share Session.mapper(SomeObject) across two scoped sessions?

2008-01-30 Thread Jonathan LaCour
Gaetan de Menten wrote: The only thing, is that we still provide a default session, which is based on Session.mapper, for convenience and backward compatibility. Maybe we should state more prominently in the Elixir doc that this is only a default session and that you can use any session you

[sqlalchemy] Re: a way to share Session.mapper(SomeObject) across two scoped sessions?

2008-01-25 Thread Kumar McMillan
On Jan 25, 2008 11:58 AM, Michael Bayer [EMAIL PROTECTED] wrote: ...so this test will pass if you change setUp to read: Session.mapper(SomeObject, table, properties={ 'options':relation(SomeOtherObject) }, save_on_init=False)

[sqlalchemy] Re: a way to share Session.mapper(SomeObject) across two scoped sessions?

2008-01-25 Thread Michael Bayer
On Jan 25, 2008, at 12:16 PM, Kumar McMillan wrote: class ScopedMapperTest(PersistTest): @@ -1027,6 +1046,21 @@ pass Session.mapper(Baz, table2, extension=ext) assert hasattr(Baz, 'query') + +def test_attach_assigned_objects_to_multiple_sess(self): +

[sqlalchemy] Re: a way to share Session.mapper(SomeObject) across two scoped sessions?

2008-01-25 Thread Michael Bayer
On Jan 25, 2008, at 2:02 PM, Kumar McMillan wrote: On Jan 25, 2008 11:58 AM, Michael Bayer [EMAIL PROTECTED] wrote: ...so this test will pass if you change setUp to read: Session.mapper(SomeObject, table, properties={ 'options':relation(SomeOtherObject) },

[sqlalchemy] Re: a way to share Session.mapper(SomeObject) across two scoped sessions?

2008-01-25 Thread Kumar McMillan
On Jan 24, 2008 2:46 PM, Kumar McMillan [EMAIL PROTECTED] wrote: but, since I am explicitly saving it to a new session and the session has a different scope, shouldn't this be possible? Maybe I'm not fully understanding scoped sessions. I am hesitant to file this as a bug because I'm not sure