[sqlalchemy] Re: Testing the state of an object in a session.

2009-05-04 Thread thatsanicehatyouhave
Hi Michael, On 1 May 2009, at 20:50, Michael Bayer wrote: obj in session.new obj in session.dirty obj in session Cheers for that. I was actually on the right page in the documentation when I was looking for that.

[sqlalchemy] MYSQL cascade constraint on column

2009-05-04 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
Hello - I am developing the back-end of an application using Python and SQLAlchemy. The web-based (PHP, etc.) administrative front-end to the application is the responsibility of another developer. The point of commonality between the two is the database. I have already figured out how to have

[sqlalchemy] One-to-many relation fails with unsaved, pending instance and is an orphan

2009-05-04 Thread Christoph Haas
Dear list, I have an SQLAlchemy problem that has ruined my last weekend. So I have reduced the problem to the bare minimum and thought I'd ask here on what my fault is. :) Imagine a (web) application that has Users (employees) and Items (on the shelf). Like in an online shop. Now there's a

[sqlalchemy] Re: One-to-many relation fails with unsaved, pending instance and is an orphan

2009-05-04 Thread Michael Bayer
the key to the problem is in the traceback: Traceback (most recent call last): File test.py, line 80, in module item.logbookentries.append(logbookentry) File /Users/classic/dev/sqlalchemy/lib/sqlalchemy/orm/attributes.py, line 159, in __get__ return