summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/util.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-12-12 13:01:34 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2010-12-12 13:01:34 -0500
commit0d71ea8126137d2b3d4141aa0fb30c2e64376d44 (patch)
treeedcc99227a474a61686f277fdc36cf2b0960e14c /lib/sqlalchemy/orm/util.py
parent6d5dd2214a4cc6340d8f07147a43fac03a12b040 (diff)
downloadsqlalchemy-0d71ea8126137d2b3d4141aa0fb30c2e64376d44.tar.gz
- inlinings and callcount reductions
- add test coverage for the rare case of noload->lazyload + pickle
Diffstat (limited to 'lib/sqlalchemy/orm/util.py')
-rw-r--r--lib/sqlalchemy/orm/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py
index c59dbed69..b5fa0c0cf 100644
--- a/lib/sqlalchemy/orm/util.py
+++ b/lib/sqlalchemy/orm/util.py
@@ -12,6 +12,7 @@ from sqlalchemy.orm.interfaces import MapperExtension, EXT_CONTINUE,\
PropComparator, MapperProperty,\
AttributeExtension
from sqlalchemy.orm import attributes, exc
+import operator
mapperlib = util.importlater("sqlalchemy.orm", "mapperlib")
@@ -514,8 +515,7 @@ def _attr_as_key(attr):
def _is_aliased_class(entity):
return isinstance(entity, AliasedClass)
-def _state_mapper(state):
- return state.manager.mapper
+_state_mapper = util.dottedgetter('manager.mapper')
def object_mapper(instance):
"""Given an object, return the primary Mapper associated with the object