<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 15:36:50 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/si/jira.issueviews:issue-xml/DBAL-278/DBAL-278.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DBAL-278] add support for lastInsertId method on OCI8 Driver</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-278</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;The method lastInsertId() is not defined for OCI8 Driver in Doctrine\DBAL\Driver\OCI8\OCI8Connection.php :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;OCI8Connection.php&lt;/b&gt;&lt;/div&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;public&lt;/span&gt; function lastInsertId($name = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
{
    &lt;span class=&quot;code-comment&quot;&gt;//TODO: &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; exception or support sequences?
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I propose this method to handle lastInsertId for sequence : &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;OCI8Connection.php&lt;/b&gt;&lt;/div&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;public&lt;/span&gt; function lastInsertId($name = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
 {
        &lt;span class=&quot;code-comment&quot;&gt;// For sequence
&lt;/span&gt;        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_string($name)) {
            &lt;span class=&quot;code-comment&quot;&gt;// We can check eventually check the presence of the sequence in the table
&lt;/span&gt;            &lt;span class=&quot;code-comment&quot;&gt;// USER_SEQUENCES
&lt;/span&gt;            $sql = &apos;SELECT &apos; . $name . &apos;.CURRVAL FROM DUAL&apos;;
            &lt;span class=&quot;code-comment&quot;&gt;// will &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; an exception &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; sequence does not exist
&lt;/span&gt;            $stmt = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;query($sql);
            $result = $stmt-&amp;gt;fetch(\PDO::FETCH_ASSOC);
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($result !== &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; &amp;amp;&amp;amp; isset($result[&apos;CURRVAL&apos;])) {
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;) $result[&apos;CURRVAL&apos;];
            }
    }
    &lt;span class=&quot;code-comment&quot;&gt;// OCI8 driver does not provide support of lastInsertId
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Thanks,&lt;/p&gt;</description>
                <environment>oci8</environment>
            <key id="13702">DBAL-278</key>
            <summary>add support for lastInsertId method on OCI8 Driver</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="franek">Franek</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 May 2012 12:50:54 +0000</created>
                <updated>Tue, 22 May 2012 19:21:16 +0000</updated>
                    <resolved>Tue, 22 May 2012 19:21:16 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.3</fixVersion>
                                <component>Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>