[sqlalchemy] Re: Foreign key error

2007-11-02 Thread Mike Orr
On 11/1/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > what happens if you autoload like the above, and then just say > t_incident.join(t_entry) ? it likely breaks. then, what happens if > you define t_entry before t_incident ? Well, today it's working, or at least at this momement. But I did

[sqlalchemy] Re: Foreign key error

2007-11-01 Thread Michael Bayer
On Nov 1, 2007, at 6:41 PM, Mike Orr wrote: > > I have two tables Incident and Entry with a 1:many relationship. > Incident.orr_id is a primary key. Entry.entry_id is a primary key, > and Entry.orr_id is a foreign key. (The column names are a legacy > tradition.) I have the following model an

[sqlalchemy] Re: Foreign key error

2007-11-01 Thread Rick Morrison
Autoloading and foreign key detection are problematic on some DB engines (I think SQlite falls in this category as it doesn't directly support FKs), on other engines they are simply hard to detect. I would think that your override of the FK in the t_incident table should be all that's needed to pi