[sqlalchemy] Re: CircularDependencyError? (Wrong approach?)

2009-07-18 Thread Michael Bayer
On Jul 17, 2009, at 4:07 PM, AF wrote: Hello, I have tables: Users Departments. (SQlite) Each User is assigned to one Department. (User.dept_id = Department.id ) Now, I want to make once User in each Dept the default user. As in: Department.default_user_id = User.id i.,e.

[sqlalchemy] Re: SQLite and foreign keys in attached schemas

2009-07-18 Thread Michael Bayer
On Jul 17, 2009, at 1:04 PM, Dimitri Tcaciuc wrote: Hey everyone, I have a main database file x.db which contains some tables with the bulk of data I'm working with. Now, when the operating program connects to it, given a unique key, I'd like to cache some data. What I was going to do

[sqlalchemy] Autoincrement Primary Keys vs. Added with an explicit Key

2009-07-18 Thread mviamari
Hello, I have a table with a simple PK ('id') that is setup to autoincrement whenever a record is added to the table. This PK is also a FK in another table. Generally this works perfectly well. The problem occurs when I add a record using an explicit value for 'id' (reading from a backup data