Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


reload after insert / update does not use right connection #727

raebbar opened this Issue · 2 comments

2 participants


If you use the reloadAfterInsert feature, Propel generates a wrong call of the reload method within the doSave method. Because of that the database connection is not passed to the reload method. In combination with transactions and a master slave setup saving a object will end up in an error, because the object is saved within the write connection on master, but not yet available on read connections which are used by default.

possible patch

Index: lib/PEAR/data/propel_generator/lib/builder/om/PHP5ObjectBuilder.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
--- lib/PEAR/data/propel_generator/lib/builder/om/PHP5ObjectBuilder.php (revision 25583)
+++ lib/PEAR/data/propel_generator/lib/builder/om/PHP5ObjectBuilder.php (revision )
@@ -4601,7 +4601,7 @@
         if ($reloadOnInsert || $reloadOnUpdate) {
             $script .= "
             if (\$reloadObject) {
-                \$this->reload(\$con);
+                \$this->reload(false, \$con);

we are using Propel 1.6.8


could you please verify if this problem also appear in the latest propel release?

If so a unit test would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.