diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-04-06 19:01:14 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-04-06 19:01:14 +0000 |
| commit | dbf936c30b14c81ccaa50a3082181bbdaa4d4d70 (patch) | |
| tree | 70e3e268da43d3b0ba37c811e1d5563ebb87ec9e /examples/polymorph | |
| parent | ccb30be0a28a93f29fbd977da585368db255f554 (diff) | |
| download | sqlalchemy-dbf936c30b14c81ccaa50a3082181bbdaa4d4d70.tar.gz | |
added explicit "session" argument to get(), select_whereclause in mapper, as well as throughout the call-chain for those. lazy loader honors the "session" of the parent object, + added simple unit test
Diffstat (limited to 'examples/polymorph')
| -rw-r--r-- | examples/polymorph/polymorph2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/polymorph/polymorph2.py b/examples/polymorph/polymorph2.py index 8f93fcdfa..351a06eca 100644 --- a/examples/polymorph/polymorph2.py +++ b/examples/polymorph/polymorph2.py @@ -86,12 +86,12 @@ class PersonLoader(MapperExtension): else: return Person() - def populate_instance(self, mapper, instance, row, identitykey, imap, isnew): + def populate_instance(self, mapper, session, instance, row, identitykey, imap, isnew): if row[person_join.c.type] =='engineer': - Engineer.mapper.populate_instance(instance, row, identitykey, imap, isnew, frommapper=mapper) + Engineer.mapper.populate_instance(session, instance, row, identitykey, imap, isnew, frommapper=mapper) return False elif row[person_join.c.type] =='manager': - Manager.mapper.populate_instance(instance, row, identitykey, imap, isnew, frommapper=mapper) + Manager.mapper.populate_instance(session, instance, row, identitykey, imap, isnew, frommapper=mapper) return False else: return sqlalchemy.mapping.EXT_PASS |
