Commits

Mike Bayer  committed e9926ce

- [bug] Fixed bug where reflection of primary key constraint
would double up columns if the same constraint/table
existed in multiple schemas.

  • Participants
  • Parent commits 586df63
  • Branches rel_0_7

Comments (0)

Files changed (2)

     attribute, causing the construct to not compile
     correctly a second time.  [ticket:2545]
 
+  - [bug] Fixed bug where reflection of primary key constraint
+    would double up columns if the same constraint/table
+    existed in multiple schemas.
+
 0.7.8
 =====
 - orm

File lib/sqlalchemy/dialects/mssql/base.py

         # Primary key constraints
         s = sql.select([C.c.column_name, TC.c.constraint_type],
             sql.and_(TC.c.constraint_name == C.c.constraint_name,
+                     TC.c.table_schema == C.c.table_schema,
                      C.c.table_name == tablename,
                      C.c.table_schema == current_schema)
         )