summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES4
-rw-r--r--lib/sqlalchemy/ext/assignmapper.py1
-rw-r--r--lib/sqlalchemy/orm/properties.py2
3 files changed, 5 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 34103bf0a..94b2e0e8e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+0.2.7
+- assignmapper was setting is_primary=True, causing all sorts of mayhem
+by not raising an error when redundant mappers were set up, fixed
+
0.2.6
- big overhaul to schema to allow truly composite primary and foreign
key constraints, via new ForeignKeyConstraint and PrimaryKeyConstraint
diff --git a/lib/sqlalchemy/ext/assignmapper.py b/lib/sqlalchemy/ext/assignmapper.py
index 240a46e3b..5b77052e2 100644
--- a/lib/sqlalchemy/ext/assignmapper.py
+++ b/lib/sqlalchemy/ext/assignmapper.py
@@ -17,7 +17,6 @@ def monkeypatch_objectstore_method(ctx, class_, name):
setattr(class_, name, do)
def assign_mapper(ctx, class_, *args, **kwargs):
- kwargs.setdefault("is_primary", True)
if not isinstance(getattr(class_, '__init__'), types.MethodType):
def __init__(self, **kwargs):
for key, value in kwargs.items():
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py
index c34b0223a..5ff401d27 100644
--- a/lib/sqlalchemy/orm/properties.py
+++ b/lib/sqlalchemy/orm/properties.py
@@ -206,7 +206,7 @@ class PropertyLoader(mapper.MapperProperty):
if self.association is not None:
if isinstance(self.association, type):
- self.association = mapper.class_mapper(self.association, compile=False)
+ self.association = mapper.class_mapper(self.association, compile=False)._check_compile()
self.target = self.mapper.mapped_table