[sqlalchemy] Modifying the scopefunc of an existing ScopedSession

2009-10-13 Thread Iwan
Hi there, We have a situation where we have an existing ScopedSession, but want to change its scopefunc. This sounds like a strange requirement, it is because we use elixir - the issue is discusses here: http://groups.google.com/group/sqlelixir/browse_thread/thread/623f190c1784e5e9 How could

[sqlalchemy] Re: Modifying the scopefunc of an existing ScopedSession

2009-10-13 Thread Michael Bayer
Iwan wrote: Hi there, We have a situation where we have an existing ScopedSession, but want to change its scopefunc. This sounds like a strange requirement, it is because we use elixir - the issue is discusses here:

[sqlalchemy] ORM Many to Many Across Two Databases

2009-10-13 Thread Luke Arno
I have a MSSQL server with two logical databases. (I inherited this situation, of course.) There is a table in each database and an association table in one of them. What is the right way to configure this? Here is what I have and it complains about the values in foreign_keys. I've tried a lot of

[sqlalchemy] sqlalchemy.sql.expression.func and composite types

2009-10-13 Thread David Gardner
I have a PostgreSQL function that returns a composite type (a text field and 6 bigint columns). Currently I am calling it with: session.query(Job,func.farm.call_job_status(Job.path)).filter(Job.path=='testshow').first() Which returns a tuple, but the second element is a string. I could

[sqlalchemy] Re: problem with like

2009-10-13 Thread Kyle Schaffrick
On Mon, 12 Oct 2009 13:47:19 -0500 Conor conor.edward.da...@gmail.com wrote: Christian Démolis wrote: Hi, The idea of creating another column is good but it will multiplicate the size of my table by 2 for nothing. Is it possible to use MYSQL regular expression search with sql

[sqlalchemy] Persistence of Python Objects with respect to the Session

2009-10-13 Thread mviamari
Hello, I'm writing tests for my database, and I've run into a little bit of confusion. Say I have a class (we'll call it person) with two declared attributes that correspond to db columns: person.id person.name If I randomly assign a person object another attribute dynamically: