From 56e59be4e7476d7d5a10760c84b8d5ee471a6d94 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 12 Jan 2011 18:53:55 -0500 Subject: QueryableAttribute can stringify itself without triggering a mapper compile. prevents confusion when stringing the attr during an exception for something else like a bad event listen --- lib/sqlalchemy/orm/attributes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/orm') diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index 6b57d33f5..eb923bc4e 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -113,7 +113,7 @@ class QueryableAttribute(interfaces.PropComparator): ) def __str__(self): - return repr(self.parententity) + "." + self.property.key + return "%s.%s" % (self.class_.__name__, self.key) @util.memoized_property def property(self): -- cgit v1.2.1