Michael Bayer wrote: > use backref=backref(somename, lazy=False, <otherargs>).
I tried changing backrefs to "backref=backref('middle', lazy=False)" in the above test script, but hit another issue then: Traceback (most recent call last): File "C:\svn\devel\utils\eagerload.py", line 66, in ? test(False) # will work fine File "C:\svn\devel\utils\eagerload.py", line 57, in test obj = session.query(Left).get_by(tag='tag1') File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\query.py", line 95, in get_by x = self.select_whereclause(self.join_by(*args, **params), limit=1) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\query.py", line 256, in select_whereclause return self._select_statement(statement, params=params) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\query.py", line 372, in _select_statement return self.execute(statement, params=params, **kwargs) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\query.py", line 304, in execute return self.instances(result, **kwargs) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\query.py", line 323, in instances self.mapper._instance(context, row, result) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\mapper.py", line 1177, in _instance self.populate_instance(context, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\mapper.py", line 1212, in populate_instance prop.execute(selectcontext, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\interfaces.py", line 77, in execute self._get_context_strategy(selectcontext).process_row(selectcontext, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\strategies.py", line 489, in process_row instance.__dict__[self.key] = self.mapper._instance(selectcontext, decorated_row, None) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\mapper.py", line 1177, in _instance self.populate_instance(context, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\mapper.py", line 1212, in populate_instance prop.execute(selectcontext, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\interfaces.py", line 77, in execute self._get_context_strategy(selectcontext).process_row(selectcontext, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\strategies.py", line 511, in process_row self.mapper._instance(selectcontext, decorated_row, result_list) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\mapper.py", line 1177, in _instance self.populate_instance(context, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\mapper.py", line 1212, in populate_instance prop.execute(selectcontext, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\interfaces.py", line 77, in execute self._get_context_strategy(selectcontext).process_row(selectcontext, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\strategies.py", line 489, in process_row instance.__dict__[self.key] = self.mapper._instance(selectcontext, decorated_row, None) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\mapper.py", line 1177, in _instance self.populate_instance(context, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\mapper.py", line 1212, in populate_instance prop.execute(selectcontext, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\interfaces.py", line 77, in execute self._get_context_strategy(selectcontext).process_row(selectcontext, instance, row, identitykey, isnew) File "c:\svn\sqlalchemy\lib\sqlalchemy\orm\strategies.py", line 505, in process_row result_list = selectcontext.attributes[(instance, self.key)] KeyError: (<__main__.Middle object at 0x00D7A910>, 'left') --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy -~----------~----~----~----~------~----~------~--~---