[sqlalchemy] question regarding aliases in ORM, within an expression

2008-12-15 Thread Moshe C.
Table T has a self referential parent_id column. 'parent' is an orm.relation using that column. I have the following code which obviously does not work myquery = T.query() myquery = myquery.outerjoin('parent', aliased=True) myquery = myquery.reset_joinpoint() myquery =

[sqlalchemy] Re: Problem in working with two sessions to the same database.

2008-12-15 Thread Michael Bayer
On Dec 14, 2008, at 11:41 PM, Harish Vishwanath wrote: Hello All, I have a situation like this : Thread T1, has session T1Session. Thread T2, has session T2Session. They both bind to the same database. Now, I have scenario like below : u1 = User() u2 = User() u3 = User()

[sqlalchemy] Re: question regarding aliases in ORM, within an expression

2008-12-15 Thread Michael Bayer
On Dec 15, 2008, at 9:47 AM, Moshe C. wrote: Table T has a self referential parent_id column. 'parent' is an orm.relation using that column. I have the following code which obviously does not work myquery = T.query() myquery = myquery.outerjoin('parent', aliased=True) myquery =

[sqlalchemy] Re: password characters cause error

2008-12-15 Thread Michael Bayer
its a URL, so URL encode the + sign. from sqlalchemy.engine.url import make_url url = make_url('mysql://scott:ti%2b...@localhost') url.password 'ti+ger' On Dec 15, 2008, at 4:24 AM, akean wrote: A password I was given to access an institutional database contains the character '+',

[sqlalchemy] Mapping an array of strings?

2008-12-15 Thread Joril
Hi everyone! Is there a way to (declaratively) map a class so that one of its members is an array of strings? (As an example use-case, a User class with an array of her websites) With Hibernate I'd just register a custom persister that would serialize the array/list to a big varchar field, is

[sqlalchemy] Re: Mapping an array of strings?

2008-12-15 Thread az
u can use PickleType, or make your own type... i guess from MutableType. On Monday 15 December 2008 19:07:35 Joril wrote: Hi everyone! Is there a way to (declaratively) map a class so that one of its members is an array of strings? (As an example use-case, a User class with an array of her