[sqlalchemy] multiple foreign keys to the same table

2008-08-23 Thread Rob
Hi, I'm using sqlalchemy 0.5 beta 3 and I am trying to have a Call object that contains two relations to a Contact object. One is the callee and the other is the caller. The code is as follows: from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Table, Column,

[sqlalchemy] Multiple Foreign Keys

2008-08-18 Thread Ally
Hi all, I’m fairly new to DBs and SQA and I’m having a few issues with multiple foreign keys. Essentially, I have a “Character” table with Character IDs and their associated name, and a Stats table, with containing data about various events, with two separate columns both with FKs to the

[sqlalchemy] Multiple foreign keys to the same table from another table

2007-07-20 Thread Sean Davis
I have a table that has two columns that reference the same table in a foreign-key relationship. What do I need to specify and where to avoid the error below? class 'sqlalchemy.exceptions.ArgumentError': Error determining primary and/or secondary join for relationship 'FeatureLoc.feature

[sqlalchemy] Multiple Foreign Keys to the same table, problems with second object.

2007-02-20 Thread Ali
Hi, I am using the recipe for multiple foreign keys to the same table at http://www.sqlalchemy.org/trac/wiki/UsageRecipes/MultiFkRelations I am also using SessionContext, and assign_mapper It works well, except for one issue. The second object (ie that which the second foreign key references)