From: Eoghan Murray Date: Thu, 7 Apr 2016 10:57:14 +0000 (+0100) Subject: Mention the correct way of adding multiple attributes which refer to the same column X-Git-Tag: rel_1_1_0b1~71^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2880f24d93a774d02cde83dbabfd80ad279cbb05;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Mention the correct way of adding multiple attributes which refer to the same column --- diff --git a/lib/sqlalchemy/ext/declarative/base.py b/lib/sqlalchemy/ext/declarative/base.py index 59ebe3722a..3404ce9f47 100644 --- a/lib/sqlalchemy/ext/declarative/base.py +++ b/lib/sqlalchemy/ext/declarative/base.py @@ -351,7 +351,8 @@ class _MapperConfig(object): util.warn( "On class %r, Column object %r named " "directly multiple times, " - "only one will be used: %s" % + "only one will be used: %s. " + "Consider using orm.synonym instead" % (self.classname, name, (", ".join(sorted(keys)))) )