Commits

Mike Bayer  committed 5127965

made the "you passed a non-aliased selectable" warning scarier. scarier !

  • Participants
  • Parent commits 234d5ff

Comments (0)

Files changed (1)

File lib/sqlalchemy/orm/mapper.py

 
         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):