[sqlalchemy] suggestion to use deferrable foreign key constraints

2007-02-22 Thread Luke Stebbing
Are there any plans to handle circular dependencies by using deferrable foreign key constraints when available? In my case, I had made the foreign key constraints deferred, but SQLAlchemy didn't pick up on that when I reflected the database metadata. I eliminated the circular dependency by using

[sqlalchemy] Re: Cascade-Delete causes AssertionError (Tries to blank-out primary key ...)

2007-02-12 Thread Luke Stebbing
Right, delete-orphan is what adds the lifecycle relationship between parent and child. It means that the child can't exist without a parent. That lets SA know that it should eliminate the child rather than trying to null out the relationship. You probably want all so that all actions performed

[sqlalchemy] Re: Cascade-Delete causes AssertionError (Tries to blank-out primary key ...)

2007-02-11 Thread Luke Stebbing
See http://www.sqlalchemy.org/docs/ datamapping.myt#datamapping_relations_lifecycle I think you want a parent-child relationship between User and Userdata. Here's how I would change it (disclaimer: I'm new to SA myself): class User(object): pass class Userdata(object): pass ### we'll