[sqlalchemy] Re: session.execute(sql_statement) does not flush the session in a autoflush=True session ?

2010-11-29 Thread Emmanuel Cazenave
Yes it surprised me. But I get your point. Thanks you for your response. On Nov 26, 9:41 pm, Michael Bayer mike...@zzzcomputing.com wrote: I wouldn't say its a bug since its intentional.   But I'll grant the intention is up for debate.   I've always considered usage of execute() to mean,

[sqlalchemy] version_id_col behavior in case of table inheritance

2010-11-29 Thread Naresh
Hi, We have a parent class/table (Notification/notifications) and a child class/table(BusinessNotification/business_notifications). Both of them have a version_id_col defined. We are facing ConcurrentModificationException errors for the model at the end of the mail. The problem is because the

[sqlalchemy] Re: version_id_col behavior in case of table inheritance

2010-11-29 Thread Naresh Khalasi
Hi, After some more internal discussions we tried and realized that the version col is not really required at the child table level. The second commit in the sample code fails because the version value on the parent row has already moved ahead. Please confirm if the understanding/conclusion is

Re: [sqlalchemy] Re: session.execute(sql_statement) does not flush the session in a autoflush=True session ?

2010-11-29 Thread Michael Bayer
I might turn it on in 0.7 and add an extra flag autoflush_on_execute just so people can turn it off if they don't like it. 0.7 is on track for beta releases in december or january. You can make yourself a quick Session subclass that wraps execute(), if you wanted this behavior right now.

Re: [sqlalchemy] Re: version_id_col behavior in case of table inheritance

2010-11-29 Thread Michael Bayer
On Nov 29, 2010, at 8:28 AM, Naresh Khalasi wrote: Hi, After some more internal discussions we tried and realized that the version col is not really required at the child table level. The second commit in the sample code fails because the version value on the parent row has already

Re: [sqlalchemy] Char encoding..

2010-11-29 Thread Michael Bayer
we've got unicode round trips down very well for years now with plenty of tests, so would need a specific series of steps to reproduce what you're doing here. Note that the recommended connect string for MySQL + Mysqldb looks like mysql://scott:ti...@localhost/test?charset=utf8use_unicode=0 .

Re: [sqlalchemy] Char encoding..

2010-11-29 Thread Warwick Prince
Hi Michael Thanks for your thoughts and comments to date. I can replicate the problem with ease, so perhaps this will help; # -*- coding: utf-8 -*- e = create_engine('mysql+mysqlconnector://user:passw...@127.0.0.1/testdb?use_unicode=0', encoding='utf8', echo=False) m = MetaData(e) t =

[sqlalchemy] Re: version_id_col behavior in case of table inheritance

2010-11-29 Thread Naresh
Thanks Michael for the confirmation/explanation. On Nov 29, 8:25 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Nov 29, 2010, at 8:28 AM, Naresh Khalasi wrote: Hi, After some more internal discussions we tried and realized that the version col is not really required at the child