<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 26 02:13:33 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DC+AND+resolution+%3D+Unresolved+AND+component+%3D+Transactions+ORDER+BY+priority+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DC+AND+resolution+%3D+Unresolved+AND+component+%3D+Transactions+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="3" total="3"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DC-845] One of our Foreign Keys is not being inserted/passed</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-845</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;We are working on a symfony/doctrine project and have come to a near halt on development.&lt;/p&gt;

&lt;p&gt;We feel that now, it may be a bug/feature in doctrine, regarding foreign keys&lt;/p&gt;

&lt;p&gt;Part of our model includes a join table that references three different table. Below is a diagram of what the model looks like, and the relevant portion of our schema.yml is at the bottom.&lt;/p&gt;

&lt;p&gt;Image of our schema: &lt;a href=&quot;http://imgur.com/dfFYI.png&quot; class=&quot;external-link&quot;&gt;http://imgur.com/dfFYI.png&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have a form that contains a set of embedded forms that attempt to create a new Person entry and add rows to the join table, adding items to the PersonName table as needed.&lt;/p&gt;

&lt;p&gt;The form attempts to do this by creating and saving PersonName objects with NameType parameters, but are running into the problem of Doctrine not including that column when trying to do an insert into the join table.&lt;/p&gt;

&lt;p&gt;Part of the problem seems to be caused by the Doctrine_Connection_UnitOfWork::saveAssociations method:&lt;/p&gt;

&lt;p&gt;                foreach ($v-&amp;gt;getInsertDiff() as $r) &lt;/p&gt;
{
                    $assocRecord = $assocTable-&amp;gt;create();
                    $assocRecord-&amp;gt;set($assocTable-&amp;gt;getFieldName($rel-&amp;gt;getForeign()), $r);
                    $assocRecord-&amp;gt;set($assocTable-&amp;gt;getFieldName($rel-&amp;gt;getLocal()), $record);
                    $this-&amp;gt;saveGraph($assocRecord);
                }

&lt;p&gt;Are we correct in understanding that this means that Doctrine 1.2 does not support tables with multiple foreign keys in this scenario?&lt;/p&gt;


&lt;p&gt;Here is the relevant portion of schema.yml:&lt;/p&gt;

&lt;p&gt;agPerson: &lt;br/&gt;
  columns: &lt;br/&gt;
    id: &lt;br/&gt;
      primary: true &lt;br/&gt;
      type: integer(5) &lt;br/&gt;
      autoincrement: true &lt;br/&gt;
  relations: &lt;br/&gt;
    agPersonName: &lt;br/&gt;
      class: agPersonName &lt;br/&gt;
      refClass: agPersonMjAgPersonName &lt;br/&gt;
      local: person_id &lt;br/&gt;
      foreign: person_name_id &lt;br/&gt;
    agPersonNameType: &lt;br/&gt;
      class: agPersonNameType &lt;br/&gt;
      refClass: agPersonMjAgPersonName &lt;br/&gt;
      local: person_id &lt;br/&gt;
      foreign: person_name_type_id &lt;br/&gt;
agPersonNameType: &lt;br/&gt;
  columns: &lt;br/&gt;
    id: &lt;br/&gt;
      primary: true &lt;br/&gt;
      type: integer(2) &lt;br/&gt;
      autoincrement: true &lt;br/&gt;
    person_name_type: &lt;br/&gt;
      unique: true &lt;br/&gt;
      type: string(30) &lt;br/&gt;
      notnull: true &lt;br/&gt;
    app_display: &lt;br/&gt;
      default: 1 &lt;br/&gt;
      type: boolean &lt;br/&gt;
      notnull: true &lt;br/&gt;
  relations: &lt;br/&gt;
    agPerson: &lt;br/&gt;
      class: agPerson &lt;br/&gt;
      refClass: agPersonMjAgPersonName &lt;br/&gt;
      local: person_name_type_id &lt;br/&gt;
      foreign: person_id &lt;br/&gt;
    agPersonName: &lt;br/&gt;
      class: agPersonName &lt;br/&gt;
      refClass: agPersonMjAgPersonName &lt;br/&gt;
      local: person_name_type_id &lt;br/&gt;
      foreign: person_name_id &lt;br/&gt;
agPersonName: &lt;br/&gt;
  columns: &lt;br/&gt;
    id: &lt;br/&gt;
      primary: true &lt;br/&gt;
      type: integer(5) &lt;br/&gt;
      autoincrement: true &lt;br/&gt;
    person_name: &lt;br/&gt;
      unique: true &lt;br/&gt;
      type: string(64) &lt;br/&gt;
      notnull: true &lt;br/&gt;
  relations: &lt;br/&gt;
    agPerson: &lt;br/&gt;
      class: agPerson &lt;br/&gt;
      refClass: agPersonMjAgPersonName &lt;br/&gt;
      local: person_name_id &lt;br/&gt;
      foreign: person_id &lt;br/&gt;
    agPersonNameType: &lt;br/&gt;
      class: agPersonNameType &lt;br/&gt;
      refClass: agPersonMjAgPersonName &lt;br/&gt;
      local: person_name_id &lt;br/&gt;
      foreign: person_name_type_id &lt;br/&gt;
agPersonMjAgPersonName: &lt;br/&gt;
  columns: &lt;br/&gt;
    id: &lt;br/&gt;
      primary: true &lt;br/&gt;
      type: integer(5) &lt;br/&gt;
      autoincrement: true &lt;br/&gt;
    person_id: &lt;br/&gt;
      type: integer(5) &lt;br/&gt;
      notnull: true &lt;br/&gt;
    person_name_id: &lt;br/&gt;
      type: integer(5) &lt;br/&gt;
      notnull: true &lt;br/&gt;
    person_name_type_id: &lt;br/&gt;
      type: integer(2) &lt;br/&gt;
      notnull: true &lt;br/&gt;
    is_primary: &lt;br/&gt;
      type: boolean &lt;br/&gt;
      notnull: true &lt;br/&gt;
  indexes: &lt;br/&gt;
    UX_ag_person_mj_ag_person_name: &lt;br/&gt;
      fields: &lt;span class=&quot;error&quot;&gt;&amp;#91;person_name_id, person_name_type_id, person_id&amp;#93;&lt;/span&gt; &lt;br/&gt;
      type: unique &lt;br/&gt;
  relations: &lt;br/&gt;
    agPerson: &lt;br/&gt;
      local: person_id &lt;br/&gt;
      foreign: id &lt;br/&gt;
    agPersonName: &lt;br/&gt;
      local: person_name_id &lt;br/&gt;
      foreign: id &lt;br/&gt;
    agPersonNameType: &lt;br/&gt;
      local: person_name_type_id &lt;br/&gt;
      foreign: id &lt;br/&gt;
actAs: &lt;br/&gt;
  Timestampable: &lt;/p&gt;



&lt;p&gt;As a caveat: we&apos;ve noticed that sfdoctrineguard group table, has such a relationship:&lt;/p&gt;

&lt;p&gt;mysql&amp;gt; describe sf_guard_user_group;&lt;br/&gt;
&lt;ins&gt;-----------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;--------&lt;del&gt;&lt;ins&gt;&lt;/del&gt;----&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;---&lt;del&gt;&lt;ins&gt;&lt;/del&gt;-------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;------+&lt;/p&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; Field      &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; Type     &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; Null &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; Key &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; Default &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; Extra &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;ins&gt;-----------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;--------&lt;del&gt;&lt;ins&gt;&lt;/del&gt;----&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;---&lt;del&gt;&lt;ins&gt;&lt;/del&gt;-------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;------+&lt;/p&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; user_id    &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; int(11)  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; NO   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; PRI &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0       &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; group_id   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; int(11)  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; NO   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; PRI &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0       &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; created_at &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; datetime &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; NO   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; NULL    &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; updated_at &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; datetime &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; NO   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; NULL    &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;ins&gt;-----------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;--------&lt;del&gt;&lt;ins&gt;&lt;/del&gt;----&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;---&lt;del&gt;&lt;ins&gt;&lt;/del&gt;-------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;------+&lt;/p&gt;


&lt;p&gt;i.e. IT has two foreign keys taken into account&lt;/p&gt;</description>
                <environment>Linux ubuntu 2.6.31-22-generic #63-Ubuntu SMP Thu Aug 19 00:23:50 UTC 2010 x86_64 GNU/Linux&lt;br/&gt;
PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cli) (built: Jan  6 2010 22:56:44) &lt;br/&gt;
mysql  Ver 14.14 Distrib 5.1.37, for debian-linux-gnu (x86_64) using  EditLine wrapper</environment>
            <key id="11840">DC-845</key>
            <summary>One of our Foreign Keys is not being inserted/passed</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="zelaz">charles wisniewski</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 Aug 2010 12:06:42 +0000</created>
                <updated>Fri, 27 Aug 2010 12:06:42 +0000</updated>
                                    <version>1.2.0</version>
                <version>1.2.1</version>
                <version>1.2.2</version>
                <version>1.2.3</version>
                                                <component>Record</component>
                <component>Relations</component>
                <component>Transactions</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-984] Pessimistic locking locks entire table rather than record</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-984</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When using pessimistic locking as described in:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/projects/orm/1.2/docs/manual/component-overview:locking-manager:examples/zh&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/projects/orm/1.2/docs/manual/component-overview:locking-manager:examples/zh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the locking manager locks the entire table rather than the specific object. &lt;/p&gt;

&lt;p&gt;This should be clear from the attached patch which corrects the issue (assuming I have correctly interpreted the intention of pessimistic locking!).&lt;/p&gt;

&lt;p&gt;The current behavior will have worked as expected for users but it will have locked far more than was intended and may thus have affected performance.&lt;/p&gt;

&lt;p&gt;NB: I can confirm this works for non-composite keys but please review and test for composite keys as I have no such tables to hand.&lt;/p&gt;</description>
                <environment>Standard LAMP stack using current SVN from &lt;a href=&quot;http://svn.doctrine-project.org/branches/1.2/lib/Doctrine/Locking/Manager&quot;&gt;http://svn.doctrine-project.org/branches/1.2/lib/Doctrine/Locking/Manager&lt;/a&gt;</environment>
            <key id="12471">DC-984</key>
            <summary>Pessimistic locking locks entire table rather than record</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="barryo">Barry O&apos;Donovan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Mar 2011 07:53:30 +0000</created>
                <updated>Thu, 13 Dec 2012 13:13:16 +0000</updated>
                                    <version>1.2.4</version>
                                                <component>Transactions</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="16657" author="barryo" created="Tue, 18 Oct 2011 07:49:18 +0000"  >&lt;p&gt;Folks - just wondering if anyone had a chance to look at this as, while not critical, it does appear to be a genuinely major performance issue.&lt;/p&gt;</comment>
                    <comment id="19132" author="greg0ire" created="Thu, 13 Dec 2012 13:13:16 +0000"  >&lt;p&gt;Duplicate with more information : &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-185&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DC-185&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10953" name="Doctrine_Locking_Manager_Pessimistic.diff" size="855" author="barryo" created="Wed, 16 Mar 2011 07:53:30 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-526] Savepoint-rollback ignored in nested transaction context.</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-526</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;The example from the documentation on savepoints:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; {
    $conn-&amp;gt;beginTransaction();
    &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; some operations here 
&lt;/span&gt;
    &lt;span class=&quot;code-comment&quot;&gt;// creates a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; savepoint called mysavepoint
&lt;/span&gt;    $conn-&amp;gt;beginTransaction(&apos;mysavepoint&apos;);
    &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; {
        &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; some operations here
&lt;/span&gt;
        $conn-&amp;gt;commit(&apos;mysavepoint&apos;);
    } &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt;(Exception $e) {
        $conn-&amp;gt;rollback(&apos;mysavepoint&apos;); # (a)
    }
    $conn-&amp;gt;commit();
} &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt;(Exception $e) {
    $conn-&amp;gt;rollback();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What seems to be a bug to me: (a) doesn&apos;t actually do a savepoint-rollback if reached, but rather returns false as soon as the nesting level is seen to be &amp;gt; 1.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10966">DC-526</key>
            <summary>Savepoint-rollback ignored in nested transaction context.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="napsi">Michael Nielsen</reporter>
                        <labels>
                    </labels>
                <created>Fri, 26 Feb 2010 04:19:09 +0000</created>
                <updated>Fri, 6 Aug 2010 03:11:39 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Transactions</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="12239" author="jwage" created="Mon, 15 Mar 2010 16:26:10 +0000"  >&lt;p&gt;What rdbms are you using? Does it support this feature?&lt;/p&gt;</comment>
                    <comment id="12263" author="napsi" created="Mon, 15 Mar 2010 18:15:07 +0000"  >&lt;p&gt;I use MySQL 5.0.51/InnoDB. It is supported and the doctrine-example does indeed work, if I hack the rollback-method a bit.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://trac.doctrine-project.org/browser/tags/1.2.1/lib/Doctrine/Transaction.php&quot; class=&quot;external-link&quot;&gt;http://trac.doctrine-project.org/browser/tags/1.2.1/lib/Doctrine/Transaction.php&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;316	    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function rollback($savepoint = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
317	    {
318	        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel == 0) {
319	            &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Doctrine_Transaction_Exception(&lt;span class=&quot;code-quote&quot;&gt;&quot;Rollback failed. There is no active transaction.&quot;&lt;/span&gt;);
320	        }
321	       
322	        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;conn-&amp;gt;connect();
323	
324	        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_internalNestingLevel &amp;gt;= 1 &amp;amp;&amp;amp; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel &amp;gt; 1) {
325	            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_internalNestingLevel--;
326	            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel--;
327	            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
328	        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel &amp;gt; 1) {
329	            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel--;
330	            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
331	        }
332	
333	        $listener = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;conn-&amp;gt;getAttribute(Doctrine_Core::ATTR_LISTENER);
334	
335	        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! is_null($savepoint)) {
[...]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The problem is that in a nested context, the rollback-method never does anything but a nesting-level decrement and a false-return, regardless of savepoints. So in the doctrine-example, (a) just ends up at the false-return at line 327 or 330, rather than reaching the savepoint-rollback-block starting at line 335. And so the command is never sent to MySQL.&lt;/p&gt;</comment>
                    <comment id="12264" author="jwage" created="Mon, 15 Mar 2010 18:23:42 +0000"  >&lt;p&gt;Do you have a patch/diff that fixes the issue for you?&lt;/p&gt;</comment>
                    <comment id="12268" author="napsi" created="Mon, 15 Mar 2010 19:27:37 +0000"  >&lt;p&gt;I just skipped the nestingLevel-section in case of a savepoint. I have not spent any time reviewing how (un)healthy that might be for the level counters and the method in general, but it fixes my current application of it. &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;@@ -321,14 +321,16 @@
         
         $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;conn-&amp;gt;connect();
 
-        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_internalNestingLevel &amp;gt;= 1 &amp;amp;&amp;amp; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel &amp;gt; 1) {
-            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_internalNestingLevel--;
-            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel--;
-            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
-        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel &amp;gt; 1) {
-            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel--;
-            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
-        }
+	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_null($savepoint)) {
+		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_internalNestingLevel &amp;gt;= 1 &amp;amp;&amp;amp; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel &amp;gt; 1) {
+			$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_internalNestingLevel--;
+			$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel--;
+			&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
+		} &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel &amp;gt; 1) {
+			$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel--;
+			&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
+		}
+	}
 
         $listener = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;conn-&amp;gt;getAttribute(Doctrine_Core::ATTR_LISTENER);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="13222" author="jwage" created="Tue, 8 Jun 2010 17:09:55 +0000"  >&lt;p&gt;The change unfortunately breaks the tests.&lt;/p&gt;</comment>
                    <comment id="13792" author="hckurniawan" created="Fri, 6 Aug 2010 03:11:39 +0000"  >&lt;p&gt;Hi Jonathan,&lt;/p&gt;

&lt;p&gt;I can also replicate and confirm the issue. I found a workaround that will fix this issue.&lt;br/&gt;
However in saying that, I&apos;m not very familiar with Doctrine base code and may have broken something else.&lt;br/&gt;
I&apos;d be very grateful if you can have a look at the following fix.&lt;/p&gt;

&lt;p&gt;The patch is for Doctrine/Transaction.php&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;@@ -214,9 +214,9 @@
                 }
                 $listener-&amp;gt;postTransactionBegin($event);
             }
-        }
 
         $level = ++$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel;
+        }
 
         &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $level;
     }
@@ -244,7 +244,7 @@
         $listener = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;conn-&amp;gt;getAttribute(Doctrine_Core::ATTR_LISTENER);
 
         &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! is_null($savepoint)) {
-            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel -= $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;removeSavePoints($savepoint);
+            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;removeSavePoints($savepoint);
 
             $event = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Doctrine_Event($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;, Doctrine_Event::SAVEPOINT_COMMIT);
 
@@ -333,7 +333,7 @@
         $listener = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;conn-&amp;gt;getAttribute(Doctrine_Core::ATTR_LISTENER);
 
         &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! is_null($savepoint)) {
-            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nestingLevel -= $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;removeSavePoints($savepoint);
+            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;removeSavePoints($savepoint);
 
             $event = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Doctrine_Event($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;, Doctrine_Event::SAVEPOINT_ROLLBACK);
 
@@ -507,7 +507,10 @@
      */
     &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function beginInternalTransaction($savepoint = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
     {
+        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_null($savepoint)) {
         $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_internalNestingLevel++;
+        }
+
         &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;beginTransaction($savepoint);
     }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Thanks&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>