summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/mapper.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2005-10-23 03:46:20 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2005-10-23 03:46:20 +0000
commit722f97a826944073089998c42c48371a2514b9d6 (patch)
tree186a0811e53cd10ec87cdb9bb2d0bf18b65f4509 /lib/sqlalchemy/mapper.py
parent23b0eef7a13bb5c4cc9f30ac6a32502146723c14 (diff)
downloadsqlalchemy-722f97a826944073089998c42c48371a2514b9d6.tar.gz
Diffstat (limited to 'lib/sqlalchemy/mapper.py')
-rw-r--r--lib/sqlalchemy/mapper.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sqlalchemy/mapper.py b/lib/sqlalchemy/mapper.py
index 787cfd27e..5f65f0294 100644
--- a/lib/sqlalchemy/mapper.py
+++ b/lib/sqlalchemy/mapper.py
@@ -518,6 +518,7 @@ class Mapper(object):
if objectstore.uow().has_key(identitykey):
instance = objectstore.uow()._get(identitykey)
+ isnew = False
if populate_existing:
isnew = not imap.has_key(identitykey)
if isnew:
@@ -525,7 +526,7 @@ class Mapper(object):
for prop in self.props.values():
prop.execute(instance, row, identitykey, imap, isnew)
- if self.extension.append_result(self, row, imap, result, instance, populate_existing=populate_existing):
+ if self.extension.append_result(self, row, imap, result, instance, isnew, populate_existing=populate_existing):
if result is not None:
result.append_nohistory(instance)
@@ -561,7 +562,7 @@ class Mapper(object):
for prop in self.props.values():
prop.execute(instance, row, identitykey, imap, isnew)
- if self.extension.append_result(self, row, imap, result, instance, populate_existing=populate_existing):
+ if self.extension.append_result(self, row, imap, result, instance, isnew, populate_existing=populate_existing):
if result is not None:
result.append_nohistory(instance)
@@ -1128,7 +1129,7 @@ class BinaryVisitor(sql.ClauseVisitor):
class MapperExtension(object):
def create_instance(self, mapper, row, imap, class_):
return None
- def append_result(self, mapper, row, imap, result, instance, populate_existing=False):
+ def append_result(self, mapper, row, imap, result, instance, isnew, populate_existing=False):
return True
def after_insert(self, mapper, instance):
pass