From: Mike Bayer Date: Mon, 5 Jan 2009 20:02:23 +0000 (+0000) Subject: made the "you passed a non-aliased selectable" warning scarier. scarier ! X-Git-Tag: rel_0_5_0~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c55d3f8a7c42963e916626de92b7b9dec20cd86b;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git made the "you passed a non-aliased selectable" warning scarier. scarier ! --- diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index 3166178352..fd23f5563d 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -161,7 +161,9 @@ class Mapper(object): if isinstance(self.local_table, expression._SelectBaseMixin): util.warn("mapper %s creating an alias for the given " - "selectable - use Class attributes for queries." % self) + "selectable. References to the original selectable " + "may be misinterpreted by queries, polymorphic_on, etc. " + " Consider passing an explicit selectable.alias() construct instead." % self) self.local_table = self.local_table.alias() if self.with_polymorphic and isinstance(self.with_polymorphic[1], expression._SelectBaseMixin):