RE: [sqlalchemy] Anticipating an IntegrityError before it happens (or noticing it immediately after)

2012-01-23 Thread Jackson, Cameron
Wichert Akkerman Sent: Monday, 23 January 2012 6:44 PM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Anticipating an IntegrityError before it happens (or noticing it immediately after) On 2012-1-23 03:23, Jackson, Cameron wrote: > Anyway, it kind of looks to me like any attempt to

Re: [sqlalchemy] Anticipating an IntegrityError before it happens (or noticing it immediately after)

2012-01-22 Thread Wichert Akkerman
On 2012-1-23 03:23, Jackson, Cameron wrote: Anyway, it kind of looks to me like any attempt to do this in some sort of clever automatic way is going to be more trouble than its worth, so I think I'll just bite the bullet and put backrefs on all of the relationships that are going to the table in

RE: [sqlalchemy] Anticipating an IntegrityError before it happens (or noticing it immediately after)

2012-01-22 Thread Jackson, Cameron
.au<http://www.thalesgroup.com.au> From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Michael Bayer Sent: Monday, 23 January 2012 12:41 PM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Anticipating an IntegrityError before it happens (or noticing it

Re: [sqlalchemy] Anticipating an IntegrityError before it happens (or noticing it immediately after)

2012-01-22 Thread Michael Bayer
On Jan 22, 2012, at 7:50 PM, Jackson, Cameron wrote: > I have a certain ORM model that is being referenced from several other > models. I don't want the user to be able to delete rows from that table that > are still being referenced elsewhere. > > Ideally I would like something like: > r