diff options
Diffstat (limited to 'lib/sqlalchemy/orm/mapper.py')
| -rw-r--r-- | lib/sqlalchemy/orm/mapper.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index c9c342dc9..4db2b40f2 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -474,6 +474,10 @@ class Mapper(object): else: return self + def common_parent(self, other): + """return true if the given mapper shares a common inherited parent as this mapper""" + return self.base_mapper() is other.base_mapper() + def isa(self, other): """return True if the given mapper inherits from this mapper""" m = other |
