- changed status to resolved
detect column conflicts in declarative single table inh
Issue #1732
resolved
diff -r 19de4da70f714a1918ed1370f9a4ac589f20b7de lib/sqlalchemy/ext/declarative.py
--- a/lib/sqlalchemy/ext/declarative.py Thu Mar 11 12:42:06 2010 -0500
+++ b/lib/sqlalchemy/ext/declarative.py Thu Mar 11 14:29:12 2010 -0500
@@ -679,6 +679,10 @@
raise exceptions.ArgumentError(
"Can't place primary key columns on an inherited class with no table."
)
+ if c.name in inherited_table.c:
+ raise exceptions.ArgumentError(
+ "Column '%s' on class %s conflicts with existing column '%s'" % (c, cls, inherited_table.c[c.name](c.name))
+ )
inherited_table.append_column(c)
# single or joined inheritance
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.6.0 (automated comment)
- Log in to comment
5f15e5569c89cc39918752d54520abb89b760a18