<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 20:03:27 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+DBAL+AND+status+%3D+Reopened+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+DBAL+AND+status+%3D+Reopened+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>[DBAL-320] allow SQL QueryBuilder to do INSERTS</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-320</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;With&lt;/p&gt;

&lt;p&gt;$db = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);&lt;br/&gt;
$qb = $db-&amp;gt;createQueryBuilder();&lt;/p&gt;

&lt;p&gt;this QueryBuilder I&apos;m able to do SELECT, UPDATE and DELETE. However, INSERT is not possible. Are there any good reasons for this?&lt;/p&gt;

&lt;p&gt;Attached you find a patch that until now works fine for me. I don&apos;t know, however, if there are any side effects.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13961">DBAL-320</key>
            <summary>allow SQL QueryBuilder to do INSERTS</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="tcm">Tim Mundt</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 Aug 2012 10:45:41 +0000</created>
                <updated>Mon, 13 Aug 2012 13:12:47 +0000</updated>
                                    <version>2.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18489" author="ocramius" created="Mon, 13 Aug 2012 10:46:59 +0000"  >&lt;p&gt;Insert is not supported by DQL&lt;/p&gt;</comment>
                    <comment id="18490" author="tcm" created="Mon, 13 Aug 2012 11:15:52 +0000"  >&lt;p&gt;Well, that was quick and not helpful. I have read about the QueryBuilder in the ORM package. For some reason with persistence (that other libraries don&apos;t have), insert cannot be supported. However, I&apos;m talking about DBAL here. What good reason is there not to support INSERT??&lt;/p&gt;</comment>
                    <comment id="18491" author="tcm" created="Mon, 13 Aug 2012 11:16:30 +0000"  >&lt;p&gt;see previous comment, I&apos;d appreciate some clarification&lt;/p&gt;</comment>
                    <comment id="18492" author="ocramius" created="Mon, 13 Aug 2012 11:30:30 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=tcm&quot; class=&quot;user-hover&quot; rel=&quot;tcm&quot;&gt;Tim Mundt&lt;/a&gt; Ouch, no, it was my fault, sorry. &lt;br/&gt;
I confused the project related to the issue.&lt;/p&gt;</comment>
                    <comment id="18493" author="ocramius" created="Mon, 13 Aug 2012 11:34:13 +0000"  >&lt;p&gt;This is actually valid (even the patch, though it needs to adds tests)&lt;/p&gt;</comment>
                    <comment id="18494" author="tcm" created="Mon, 13 Aug 2012 11:56:16 +0000"  >&lt;p&gt;Glad to hear there seems to be no fundamental problem with this. Can I somehow help this patch go into the code? I&apos;m not familiar with the tests here. If you give me some pointer, maybe I can come up with something useful. On the other hand, it could be a good idea for some more involved people to have a look at this before.&lt;/p&gt;</comment>
                    <comment id="18496" author="ocramius" created="Mon, 13 Aug 2012 12:13:24 +0000"  >&lt;p&gt;You&apos;d need to add tests in &lt;a href=&quot;https://github.com/doctrine/dbal/blob/master/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/blob/master/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php&lt;/a&gt; (to be included in your patch or in a github pull request)&lt;br/&gt;
A Github PR is also the fastest way to get your code reviewed since not everyone visits the issue tracker.&lt;/p&gt;</comment>
                    <comment id="18497" author="tcm" created="Mon, 13 Aug 2012 13:12:47 +0000"  >&lt;p&gt;Here&apos;s the PR: &lt;a href=&quot;https://github.com/doctrine/dbal/pull/184&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/184&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11310" name="INSERT-for-doctrine-SQL-QueryBuilder.patch" size="2479" author="tcm" created="Mon, 13 Aug 2012 10:45:41 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-289] Wrong diff between Oracle &apos;Date&apos; type and Metadata &apos;Date&apos; type</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-289</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Hi,&lt;br/&gt;
I want to update my schema but I am getting the following error message:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Doctrine\DBAL\Driver\OCI8\OCI8Exception&amp;#93;&lt;/span&gt;&lt;br/&gt;
ORA-01442: column to be modified to NOT NULL is already NOT NULL&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;--dump-sql says:&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-sql&quot;&gt;ALTER TABLE CONSIGNMENTS MODIFY (SDGDATE  DATE DEFAULT NULL);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The current table structure looks like that:&lt;/p&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; Column Name &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; Data Type &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; Nullable &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; Default &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; Primary Key &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; SDGDATE &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; DATE &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; Yes &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; NULL &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;


&lt;p&gt;Mapping definition:&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;/**
 * @ORM\Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;SDGDATE&quot;&lt;/span&gt;,type=&lt;span class=&quot;code-quote&quot;&gt;&quot;date&quot;&lt;/span&gt;,nullable=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $sdgdate;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think there is a problem with the comparison between Oracles &apos;Date&apos; type and the Metadata &apos;Date&apos; type. I am used to use MySQL as DBMS but our customer uses Oracle. MySQL&apos;s &apos;datetime&apos; and Oracle&apos;s &apos;date&apos; type are store the same data.&lt;/p&gt;

&lt;p&gt;I am not sure what should be done here. Because this could lead to confusion for all Oracle user.&lt;/p&gt;

&lt;p&gt;Maybe there could be a request to the platform in the Schema Comparator here:&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;public&lt;/span&gt; function diffColumn(Column $column1, Column $column2)
{
    $changedProperties = array();
    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( $column1-&amp;gt;getType() != $column2-&amp;gt;getType() ) {
        $changedProperties[] = &apos;type&apos;;
    }
    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Oracle Express 11g and doctrine-dbal 2.2.2</environment>
            <key id="13741">DBAL-289</key>
            <summary>Wrong diff between Oracle &apos;Date&apos; type and Metadata &apos;Date&apos; type</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="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="naitsirch">Christian Stoller</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 May 2012 08:45:55 +0000</created>
                <updated>Wed, 22 Aug 2012 10:34:21 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18028" author="naitsirch" created="Wed, 30 May 2012 08:59:49 +0000"  >&lt;p&gt;When I put a breakpoint on the second line of the &lt;em&gt;diffColumn&lt;/em&gt; method in my IDE and stop there during debugging I have those variable values:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$this				Doctrine\DBAL\Schema\Comparator		
$changedProperties		array[0]		
$column1			Doctrine\DBAL\Schema\Column		
  _type				Doctrine\DBAL\Types\DateTimeType	&amp;lt;-- datetime
  _precision			integer		10	
  _scale			integer		0	
  _unsigned			boolean		0	
  _fixed			boolean		0	
  _notnull			boolean		0	
  _autoincrement		boolean		0	
  _platformOptions		array[0]		
  _comment			string		&quot;&quot;	
  _customSchemaOptions		array[0]		
  _name				string		&quot;SDGDATE&quot;	
  _quoted			boolean		0	
$column2			Doctrine\DBAL\Schema\Column		
  _type				Doctrine\DBAL\Types\DateType		&amp;lt;-- date
  _precision			integer		0	
  _scale			integer		0	
  _unsigned			boolean		0	
  _fixed			boolean		0	
  _notnull			boolean		0	
  _autoincrement		boolean		0	
  _platformOptions		array[1]		
  _customSchemaOptions		array[0]		
  _name				string		&quot;SDGDATE&quot;	
  _quoted			boolean		0	
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You see that there are different types. But it would be nice if the comparison would say: &quot;Theay are equal - no diff&quot;&lt;/p&gt;</comment>
                    <comment id="18251" author="beberlei" created="Sun, 8 Jul 2012 20:16:14 +0000"  >&lt;p&gt;This issue can&apos;t be fixed. Doctrine has this type abstraction here which prevents a special case fix here. The solution in this case is obvious, set the type to &quot;datetime&quot; on Oracle.&lt;/p&gt;</comment>
                    <comment id="18531" author="naitsirch" created="Wed, 22 Aug 2012 10:34:21 +0000"  >&lt;p&gt;Sorry, this issue commes up again.&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-javascript&quot;&gt;
Shipment:
  type: entity
  fields:
    id:
      type: integer
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      generator:
        strategy: AUTO
    pickupDate:
      type: date
      column: pickup_date
    pickupTimeFrom:
      type: time
      column: pickup_time_from
  lifecycleCallbacks: {  }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When I update my schema with the above YAML mapping, I always get the following error although I haven&apos;t changed anything at the mapping.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;font color=&quot;red&quot;&gt;&lt;br/&gt;
C:\projects\xyz\trunk&amp;gt;php app\console doctrine:schema:update --force&lt;br/&gt;
Updating database schema...&lt;br/&gt;
Der Befehl &quot;stty&quot; ist entweder falsch geschrieben oder&lt;br/&gt;
konnte nicht gefunden werden.&lt;br/&gt;
&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;Doctrine\DBAL\Driver\OCI8\OCI8Exception&amp;#93;&lt;/span&gt;&lt;br/&gt;
  ORA-01442: column to be modified to NOT NULL is already NOT NULL&lt;br/&gt;
&lt;br/&gt;
C:\projects\osl\trunk&amp;gt;php app\console doctrine:schema:update --dump-sql&lt;br/&gt;
ALTER TABLE SHIPMENT MODIFY (pickup_date  DATE NOT NULL, pickup_time_from  DATE NOT NULL)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Okay, I could change the types to &apos;datetime&apos;, but what if I have to move to MySQL? I just want to store &apos;date&apos; and &apos;time&apos;, not &apos;datetime&apos;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-544] Where&apos;s the Query::HYDRATE_BOTH constant? </title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-544</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;In the documentation of the the ResultStatement::fetch() function says that we should use the Query::HYDRATE_* constants but that constant does not exist at least not in 2.3.4.&lt;/p&gt;

&lt;p&gt;Should I just use PDO::FETCH_BOTH? But if I change the driver to sqlite or whatever is it going to work well?&lt;/p&gt;
</description>
                <environment>Doctrine 2.3.4  DBAL + ORM, using Silex</environment>
            <key id="15043">DBAL-544</key>
            <summary>Where&apos;s the Query::HYDRATE_BOTH constant? </summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="jmontoya">Julio Montoya</reporter>
                        <labels>
                        <label>Query::HYDRATE_BOTH</label>
                    </labels>
                <created>Wed, 12 Jun 2013 18:01:54 +0000</created>
                <updated>Thu, 13 Jun 2013 08:21:44 +0000</updated>
                                    <version>2.3.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20553" author="ocramius" created="Wed, 12 Jun 2013 18:09:01 +0000"  >&lt;p&gt;Query constants are defined in AbstractQuery (superclass of the Query class) - see &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/2.3.4/lib/Doctrine/ORM/AbstractQuery.php#L45-L60&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/2.3.4/lib/Doctrine/ORM/AbstractQuery.php#L45-L60&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20554" author="jmontoya" created="Wed, 12 Jun 2013 18:14:13 +0000"  >&lt;p&gt;Hello Marco! Thanks for your fast answer! &lt;br/&gt;
Some comments: The constant HYDRATE_BOTH doesn&apos;t exist, at least not with that name. Documentation should be updated too.&lt;br/&gt;
Another thing I&apos;m obliged to use ORM to call a constant in DBAL? Not a problem for me because I need both &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;</comment>
                    <comment id="20555" author="ocramius" created="Wed, 12 Jun 2013 18:25:45 +0000"  >&lt;p&gt;Sorry, confused this one as an ORM issue. &lt;/p&gt;</comment>
                    <comment id="20556" author="ocramius" created="Wed, 12 Jun 2013 18:29:26 +0000"  >&lt;p&gt;Checked briefly - you should indeed use the `PDO::FETCH_*` constants.&lt;/p&gt;

&lt;p&gt;Can you link the document that contains the imprecision?&lt;/p&gt;</comment>
                    <comment id="20564" author="jmontoya" created="Wed, 12 Jun 2013 19:12:41 +0000"  >&lt;p&gt;This is the documentation in the fetch(), fetchAll() functions in DBAL:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/ResultStatement.php#L61&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/ResultStatement.php#L61&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, if I want to fetch an Object what should I use 1. or 2. ? I don&apos;t know if this have some implications in other drivers.&lt;/p&gt;

&lt;p&gt;1. $statement-&amp;gt;fetch(\Doctrine\ORM\Query::HYDRATE_OBJECT);&lt;br/&gt;
2. $statement-&amp;gt;fetch(PDO::FETCH_OBJ);&lt;/p&gt;

&lt;p&gt;An update to the documentation will be fine too:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/data-retrieval-and-manipulation.html#using-prepared-statements&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/data-retrieval-and-manipulation.html#using-prepared-statements&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;it should be:&lt;/p&gt;

&lt;p&gt;fetch($fetchMode)&lt;/p&gt;

&lt;p&gt;instead of &lt;/p&gt;

&lt;p&gt;fetch($fetchStyle)&lt;/p&gt;

&lt;p&gt;with a list of options (constants) ...&lt;/p&gt;

</comment>
                    <comment id="20565" author="jmontoya" created="Thu, 13 Jun 2013 08:21:44 +0000"  >&lt;p&gt;Working in a PR but first we need to define those constants ...&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/jmontoyaa/dbal/commit/d3a44589cdef6c146592eee2b2bd9f8907dadd1f&quot; class=&quot;external-link&quot;&gt;https://github.com/jmontoyaa/dbal/commit/d3a44589cdef6c146592eee2b2bd9f8907dadd1f&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>