]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
made the "you passed a non-aliased selectable" warning scarier. scarier !
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Jan 2009 20:02:23 +0000 (20:02 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Jan 2009 20:02:23 +0000 (20:02 +0000)
lib/sqlalchemy/orm/mapper.py

index 31661783523d55e39a9efbc7c9ac9de8fa99574c..fd23f5563d69b4a545e4d589636053b386595706 100644 (file)
@@ -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):