summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/ext/activemapper.py2
-rw-r--r--lib/sqlalchemy/orm/interfaces.py2
-rw-r--r--lib/sqlalchemy/types.py2
-rw-r--r--test/orm/mapper.py2
4 files changed, 5 insertions, 3 deletions
diff --git a/lib/sqlalchemy/ext/activemapper.py b/lib/sqlalchemy/ext/activemapper.py
index bcfbac632..004caf849 100644
--- a/lib/sqlalchemy/ext/activemapper.py
+++ b/lib/sqlalchemy/ext/activemapper.py
@@ -271,11 +271,11 @@ class ActiveMapperMeta(type):
cls.table = Table(table_name, _metadata, autoload=True, **table_opts)
cls.columns = cls.table._columns
- # check for inheritence
if version_id_col is not None:
version_id_col_object = getattr(cls.table.c, version_id_col, None)
assert(version_id_col_object is not None, "version_id_col (%s) does not exist." % version_id_col)
+ # check for inheritence
if hasattr(bases[0], "mapping"):
cls._base_mapper= bases[0].mapper
assign_mapper(objectstore.context, cls, cls.table,
diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py
index 358e1297f..a9a26b57f 100644
--- a/lib/sqlalchemy/orm/interfaces.py
+++ b/lib/sqlalchemy/orm/interfaces.py
@@ -72,6 +72,7 @@ class MapperProperty(object):
"""
pass
+
def is_primary(self):
"""Return True if this ``MapperProperty``'s mapper is the
primary mapper for its class.
@@ -155,6 +156,7 @@ class StrategizedProperty(MapperProperty):
return strategy
def setup(self, querycontext, **kwargs):
+
self._get_context_strategy(querycontext).setup_query(querycontext, **kwargs)
def execute(self, selectcontext, instance, row, identitykey, isnew):
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py
index 7d7dbeeed..ce642c158 100644
--- a/lib/sqlalchemy/types.py
+++ b/lib/sqlalchemy/types.py
@@ -164,7 +164,7 @@ def adapt_type(typeobj, colspecs):
# if we adapted the given generic type to a database-specific type,
# but it turns out the originally given "generic" type
# is actually a subclass of our resulting type, then we were already
- # were given a more specific type than that required; so use that.
+ # given a more specific type than that required; so use that.
if (issubclass(typeobj.__class__, impltype)):
return typeobj
return typeobj.adapt(impltype)
diff --git a/test/orm/mapper.py b/test/orm/mapper.py
index 405b14cff..08faf721f 100644
--- a/test/orm/mapper.py
+++ b/test/orm/mapper.py
@@ -156,7 +156,7 @@ class MapperTest(MapperSuperTest):
pass
def testconstructorexceptions(self):
- """test that exceptions raised raised in the mapped class are not masked by sa decorations"""
+ """test that exceptions raised in the mapped class are not masked by sa decorations"""
ex = AssertionError('oops')
sess = create_session()