From e45a4150fdd7e7f58dbe343706782a59a10d703b Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 16 Jul 2012 20:09:38 -0400 Subject: - totally remove _entity_info and _extended_entity_info, replacing all usage with inspect() --- lib/sqlalchemy/orm/properties.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/sqlalchemy/orm/properties.py') diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index 6b1dd6462..044ba8e2c 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -11,7 +11,7 @@ mapped attributes. """ -from .. import sql, util, log, exc as sa_exc +from .. import sql, util, log, exc as sa_exc, inspect from ..sql import operators, expression from . import ( attributes, mapper, @@ -19,7 +19,7 @@ from . import ( dependency ) from .util import CascadeOptions, \ - _orm_annotate, _orm_deannotate, _orm_full_deannotate, _entity_info + _orm_annotate, _orm_deannotate, _orm_full_deannotate from .interfaces import MANYTOMANY, MANYTOONE, ONETOMANY,\ PropComparator, StrategizedProperty @@ -409,7 +409,9 @@ class RelationshipProperty(StrategizedProperty): def _criterion_exists(self, criterion=None, **kwargs): if getattr(self, '_of_type', None): - target_mapper, to_selectable, is_aliased_class = _entity_info(self._of_type) + info = inspect(self._of_type) + target_mapper, to_selectable, is_aliased_class = \ + info.mapper, info.selectable, info.is_aliased_class if self.property._is_self_referential and not is_aliased_class: to_selectable = to_selectable.alias() -- cgit v1.2.1