mapper() not working when using unicode literal as backref name
Issue #1330
resolved
This mapper() call:
mapper(Parent, parent_table,
properties={'children': relation(Child, backref=u'parent')})
fails with the following exception:
.../SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/properties.pyc in _post_init(self)
993
994 if self.backref is not None:
--> 995 self.backref.compile(self)
996 elif not mapper.class_mapper(self.parent.class_, compile=False)._get_property(self.key, raiseerr=False):
997 raise sa_exc.ArgumentError("Attempting to assign a new relation '%s' to "
AttributeError: 'unicode' object has no attribute 'compile'
WARNING: Failure executing file: <sabug.py>
Comments (3)
-
repo owner -
repo owner this was fixed in 0.5.3
-
repo owner - removed milestone
Removing milestone: 0.5.3 (automated comment)
- Log in to comment