[sqlalchemy] ClassManager.new_instance does not longer initialize polymorphic column

2012-01-31 Thread Torsten Landschoff
Hello again, for a while I want to upgrade our application to use SQLAlchemy 0.7.x. However I am running into changed behaviour wrt. ClassManager.new_instance. The behaviour I rely on was discussed here: http://article.gmane.org/gmane.comp.python.sqlalchemy.user/28746 Basically, I want to

Re: [sqlalchemy] ClassManager.new_instance does not longer initialize polymorphic column

2012-01-31 Thread Torsten Landschoff
On Tue, 2012-01-31 at 12:52 +0100, Torsten Landschoff wrote: However, with SQLAlchemy 0.7.5 I get $ python new_instance.py Traceback (most recent call last): File new_instance.py, line 27, in module session.commit() [...] File

[sqlalchemy] NEW and OLD objects in sqlalchemy events

2012-01-31 Thread lestat
I try rewrite trigger for postgresql in python sqlalchemy event function. Can I in sqlalchemy event context get NEW and OLD objects? I need compare attributes of NEW and OLD objects. Thanks! -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To

Re: [sqlalchemy] SQLAlchemy 0.7.5 Released

2012-01-31 Thread Michael Bayer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 That is a bug with readthedocs. The content should be the 0.7.5 content (not 100% sure though). On Jan 31, 2012, at 2:12 AM, Fayaz Yusuf Khan wrote: On Saturday 28 Jan 2012 6:05:51 PM Michael Bayer wrote: SQLAlchemy 0.7.5 is now available.

Re: [sqlalchemy] ClassManager.new_instance does not longer initialize polymorphic column

2012-01-31 Thread Michael Bayer
On Jan 31, 2012, at 7:08 AM, Torsten Landschoff wrote: On Tue, 2012-01-31 at 12:52 +0100, Torsten Landschoff wrote: However, with SQLAlchemy 0.7.5 I get $ python new_instance.py Traceback (most recent call last): File new_instance.py, line 27, in module session.commit() [...]

[sqlalchemy] Overload Query Object

2012-01-31 Thread Christian Démolis
Hi Michael, i overload class Query in my script. i have 4 ways to obtain query's results. 1/ session.query(model.x).all() 2/ session.query(model.x).first() 3/ session.query(model.x).one() 4/ for e in session.query(model.x): print e in case 1,2,3, i know which method is used What method

Re: [sqlalchemy] Overload Query Object

2012-01-31 Thread Tate Kim
Hi, Have you checked the __iter__ method ? -Original Message- From: Christian Démolis christiandemo...@gmail.com Sender: sqlalchemy@googlegroups.com Date: Tue, 31 Jan 2012 17:39:54 To: sqlalchemysqlalchemy@googlegroups.com Reply-To: sqlalchemy@googlegroups.com Subject: [sqlalchemy]

[sqlalchemy] expunge cascade behavior change

2012-01-31 Thread Kent Bower
Somewhere between 0.6.4 and 0.7.5, the expunge cascade behavior changed. Can you help me understand what changed/point me to the ticket? The attached script assertions succeed in 0.6.4 but the last one fails in 0.7.5. It doesn't seem wrong, but I'm wondering what the behavior was defined as

[sqlalchemy] What's the idiomatic way of writing INSERT... ON DUPLICATE KEY UPDATE

2012-01-31 Thread Didip Kerabat
when using SqlAlchemy Core (not using Session/ORM)? I have quite a few tables with composite primary keys that can use it for optimization. At the moment what I have is quite ghetto, below is a contrive example of it: stmt = str(user_table.insert().values(email=email, name=name)) stmt

[sqlalchemy] Learn Chinese (Mandarin) faster by using flashcards with pictures

2012-01-31 Thread ichineseflashcards 8
http://www.ichineseflashcards.com will help you learn Chinese (Mandarin) faster by using flashcards with pictures, thanks -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com. To