Re: [Sqlalchemy-users] Migration to 0.2x

2006-06-12 Thread Michael Bayer
On Jun 11, 2006, at 10:31 PM, Robert Leftwich wrote: > Next question - I have a few instances of very hairy queries that > are done as > pure text (mainly for my sanity as they are hangovers from the bad > old days of > using another ORM and took ages to get right). These are executed > in

Re: [Sqlalchemy-users] Migration to 0.2x

2006-06-11 Thread Robert Leftwich
Michael Bayer wrote: > > thats not an incompatibility, thats just a bug. or maybe the backref > youre setting up needs to know the "primaryjoin" as well since it might > not be as likely to make a "guess" in more recent versions: Yep, that enabled it to 'guess' correctly :-) Thanks! Next q

Re: [Sqlalchemy-users] Migration to 0.2x

2006-06-11 Thread Michael Bayer
robert - thats not an incompatibility, thats just a bug. or maybe the backref youre setting up needs to know the "primaryjoin" as well since it might not be as likely to make a "guess" in more recent versions: Indice.mapper.add_property('leading_companies', relati

Re: [Sqlalchemy-users] Migration to 0.2x

2006-06-11 Thread Robert Leftwich
Michael Bayer wrote: > ... and everything will still work. > Not quite :-( I have a many to many setup that was working in 0.1x that now fails during mapping initialisation with the error "Cant find any foreign key relationships between 'company_daily' and 'indice_daily'" from sql.py line 105

Re: [Sqlalchemy-users] Migration to 0.2x

2006-06-11 Thread Michael Bayer
as long as you arent using objectstore.begin(), you should be able to just "import sqlalchemy.mods.threadlocal" somewhere in your program, search and replace "objectstore.commit()" for "objectstore.flush()", change your SQL connect string to an rfc1738, and everything will still work. the

[Sqlalchemy-users] Migration to 0.2x

2006-06-10 Thread Robert Leftwich
I'm just about to embark on the upgrade from 0.1x to 0.2x and given that there is a fairly significant amount of work to be done to make it happen, I'm trying to work out the best longer term strategy. For me, the most significant change is that queries, etc are now on a session not the mapper a