<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 08:43:03 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+Validators+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+Validators+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="8" total="8"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DC-1049] error with Timestamp data Validation</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1049</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;The default value for timestamp is &quot;0000-00-00 00:00:00&quot;, so &lt;br/&gt;
$e = explode(&apos;T&apos;, trim($value))&lt;br/&gt;
should be changed to &lt;br/&gt;
$e = explode(&apos; &apos;, trim($value))&lt;/p&gt;

&lt;p&gt;public function validate($value)&lt;br/&gt;
    {&lt;br/&gt;
        if (is_null($value)) &lt;/p&gt;
{
            return true;
        }

&lt;p&gt;        $e = explode(&apos;T&apos;, trim($value));&lt;br/&gt;
        $date = isset($e&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;) ? $e&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;:null;&lt;br/&gt;
        $time = isset($e&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;) ? $e&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;:null;&lt;/p&gt;

&lt;p&gt;        $dateValidator = Doctrine_Validator::getValidator(&apos;date&apos;);&lt;br/&gt;
        $timeValidator = Doctrine_Validator::getValidator(&apos;time&apos;);&lt;/p&gt;

&lt;p&gt;        if ( ! $dateValidator-&amp;gt;validate($date)) &lt;/p&gt;
{
            return false;
        }&lt;br/&gt;
&lt;br/&gt;
        if ( ! $timeValidator-&amp;gt;validate($time)) {            return false;        }
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;        return true;&lt;br/&gt;
    }&lt;/p&gt;</description>
                <environment>Linux </environment>
            <key id="13476">DC-1049</key>
            <summary>error with Timestamp data Validation</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="coiby">Coiby Xu</reporter>
                        <labels>
                    </labels>
                <created>Sun, 26 Feb 2012 13:09:02 +0000</created>
                <updated>Sun, 26 Feb 2012 13:09:02 +0000</updated>
                                    <version>1.2.4</version>
                                                <component>Validators</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11166" name="Timestamp.php" size="2171" author="coiby" created="Sun, 26 Feb 2012 13:09:02 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-676] Validation exception thrown only if internal nesting level == 1</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-676</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I wonder why Validation exception is thrown only if internal nesting level of transaction is 1 and the manual nesting level is not considered. &lt;/p&gt;

&lt;p&gt;Line 262 - lib/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-none&quot;&gt;if ($this-&amp;gt;_internalNestingLevel == 1) {
    $tmp = $this-&amp;gt;invalid;
    $this-&amp;gt;invalid = array();
    throw new Doctrine_Validator_Exception($tmp);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I have a large database with a lot of tables and relationships. At some case the validation exception is not thrown if the validation fails. &lt;/p&gt;

&lt;p&gt;If I add $this-&amp;gt;_nestingLevel into this condition: &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-none&quot;&gt;if ($this-&amp;gt;_internalNestingLevel == 1 || $this-&amp;gt;_nestingLevel == 1) {
    $tmp = $this-&amp;gt;invalid;
    $this-&amp;gt;invalid = array();
    throw new Doctrine_Validator_Exception($tmp);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then the validation exception is thrown as excepted. &lt;/p&gt;

&lt;p&gt;I don&apos;t know why you ignore here the nesting level. &lt;/p&gt;

&lt;p&gt;It would be great if you could explain me more about these lines. &lt;/p&gt;

&lt;p&gt;I ran the unit test with this modification and got the same result. &lt;/p&gt;</description>
                <environment>PHP 5.3.1, Mac OS X 10.6</environment>
            <key id="11344">DC-676</key>
            <summary>Validation exception thrown only if internal nesting level == 1</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="dreamcocoa">Fabian Spillner</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 May 2010 17:27:22 +0000</created>
                <updated>Tue, 8 Jun 2010 16:20:02 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Validators</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="12907" author="dreamcocoa" created="Mon, 10 May 2010 18:24:17 +0000"  >&lt;p&gt;Additional information: On doctrine 1.1.x the exception is thrown without this modification. &lt;/p&gt;</comment>
                    <comment id="12908" author="dreamcocoa" created="Tue, 11 May 2010 02:50:16 +0000"  >&lt;p&gt;It seems, the problem is the counter of internal nesting level. I output these member variables: &lt;/p&gt;

&lt;p&gt;Doctrine 1.1.2&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-none&quot;&gt;Doctrine_Transaction::commit invalid is not empty - internal nesting level: 1 nesting level: 2

ok 1 - Article cannot be created if empty: Doctrine_Validator_Exception: Validation failed in class Article

  1 field had validation error:

    * 1 validator failed on slug_title (notnull)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Doctrine 1.2.2&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-none&quot;&gt;Doctrine_Transaction::commit invalid is not empty - internal nesting level: 0 nesting level: 1

not ok 1 - Empty Artcile could be created!
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="12913" author="dreamcocoa" created="Tue, 11 May 2010 08:30:25 +0000"  >&lt;p&gt;Yeah! I found the reason: &lt;/p&gt;

&lt;p&gt;I attached a template (listener) into my model which validates the body and this method call: &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-none&quot;&gt;// ...
if ($obj-&amp;gt;getAuthor()-&amp;gt;getAge())  # this creates new empty Author object
{
  // ...
}
// ...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On Doctrine 1.1, the method saveGraph() of class UnitOfWork executes first saveRelatedLocalKeys and then the hooks methods (preSave, etc.) and my code works!&lt;/p&gt;

&lt;p&gt;On Doctrine 1.2, the method saveGraph() call *&lt;b&gt;first&lt;/b&gt;* the hooks method and then the saveRelatedLocalKeys which save the empty author object and then destroy the internal nesting level &lt;br/&gt;
and the validation exception is not thrown. &lt;/p&gt;

&lt;p&gt;Workaround for my listener: &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-none&quot;&gt;// ...
if ($obj-&amp;gt;relatedExists(&quot;Author&quot;) &amp;amp;&amp;amp; $obj-&amp;gt;getAuthor()-&amp;gt;getAge())  # relatedExists() needed to avoid create empty Author object
{
  // ...
}
// ...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What do you think: It&apos;s a bug or a feature?&lt;/p&gt;</comment>
                    <comment id="12914" author="dreamcocoa" created="Tue, 11 May 2010 09:16:25 +0000"  >&lt;p&gt;A test case attached to reproduce the bug. &lt;/p&gt;

&lt;p&gt;The test passes if you remove the custom save() method of Ticket_DC676_Author class.&lt;/p&gt;

&lt;p&gt;The problem: default &quot;foobar&quot; modifies the Author and is modified. Doctrine tries to save it, &lt;br/&gt;
but because there is more than two transactions, the validation exception is not thrown for Article object. &lt;/p&gt;</comment>
                    <comment id="12915" author="jwage" created="Tue, 11 May 2010 11:42:43 +0000"  >&lt;p&gt;Something that really helps with determining what we should do is to find the exact changeset that causes the behavior. If we can look at what code was changed, we can then understand better what to do.&lt;/p&gt;</comment>
                    <comment id="13024" author="dreamcocoa" created="Thu, 20 May 2010 10:10:24 +0000"  >&lt;p&gt;This changeset affects the problem: &lt;br/&gt;
&lt;a href=&quot;http://trac.doctrine-project.org/changeset/6126/branches/1.2/lib/Doctrine/Connection/UnitOfWork.php&quot; class=&quot;external-link&quot;&gt;http://trac.doctrine-project.org/changeset/6126/branches/1.2/lib/Doctrine/Connection/UnitOfWork.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But I really don&apos;t like this logic how the validation exception is handled. I would seperate these things: &lt;/p&gt;

&lt;p&gt;The method validate() should throw exception, and the method commit() should commit only if model is valid and nothing more. &lt;/p&gt;

&lt;p&gt;1. go recursive into the model and call the validate() method&lt;/p&gt;

&lt;p&gt;2. if not valid, exception is thrown&lt;/p&gt;

&lt;p&gt;3. elseif ok, commit is called&lt;/p&gt;

&lt;p&gt;PS. Sorry for late answer: I had a lot of work ... &lt;/p&gt;</comment>
                    <comment id="13026" author="jwage" created="Thu, 20 May 2010 10:28:56 +0000"  >&lt;p&gt;Do you see something with that commit that could be changed that fixes your issue?&lt;/p&gt;</comment>
                    <comment id="13167" author="jwage" created="Tue, 8 Jun 2010 11:45:59 +0000"  >&lt;p&gt;Whoops. This change is causing some problems. It causes lots of tests to fail in our test suite. Reverting for now. Can you try your change against our test suite and see if you can determine anything? Thanks, Jon&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10600" name="DC676TestCase.php" size="3698" author="dreamcocoa" created="Tue, 11 May 2010 09:16:25 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-629] Doctrine Integer Validator should use intval() rather than round(floatval())</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-629</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&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;echo PHP_INT_MAX;
echo &lt;span class=&quot;code-quote&quot;&gt;&quot;\n&quot;&lt;/span&gt;;
echo strval(round(floatval(PHP_INT_MAX)));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;on 64 bit machine, default php install, you get:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;9223372036854775807&lt;br/&gt;
9.22337203685E+18&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;float precision is set to 12 by default. setting it higher offers no benefit, with it set to 20+, it still doesn&apos;t match up (and is actually not reliably past a certain length, i&apos;d have to dig again to find a reference though), but as you can see, no go:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;9223372036854775807&lt;br/&gt;
9223372036854775808&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;as a result, very large #&apos;s do NOT validate as doctrine integers, even though they are.&lt;/p&gt;

&lt;p&gt;fix, use intval() instead. as far as I can tell, and as far as our 400+ unit tests in our application show, PHP_INT_MAX is fully supported everywhere else except for in Validator.php@170:&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;170c170
&amp;lt;                  &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; (string) $&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; == strval(round(floatval($&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;)));
---
&amp;gt;                  &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; (string) $&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; == strval(intval($&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Ubuntu 9.10 x64, php 5.2.10</environment>
            <key id="11219">DC-629</key>
            <summary>Doctrine Integer Validator should use intval() rather than round(floatval())</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="isleshocky77">Stephen Ostrow</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Apr 2010 15:41:01 +0000</created>
                <updated>Tue, 8 Jun 2010 17:13:14 +0000</updated>
                                    <version>1.2.0-ALPHA1</version>
                <version>1.2.0-ALPHA2</version>
                <version>1.2.0-ALPHA3</version>
                <version>1.2.0-BETA1</version>
                <version>1.2.0-BETA2</version>
                <version>1.2.0-BETA3</version>
                <version>1.2.0-RC1</version>
                <version>1.2.0</version>
                <version>1.2.1</version>
                <version>1.2.2</version>
                <version>1.2.3</version>
                                                <component>Validators</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13224" author="jwage" created="Tue, 8 Jun 2010 17:13:14 +0000"  >&lt;p&gt;This breaks a test:&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;
Doctrine_Ticket_1783_TestCase...................................................failed


Doctrine_Ticket_1783_TestCase : method testValidateLargeIntegers failed on line 17 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-624] Validator_Readonly fails for new objects</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-624</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;If Readonly validator is on for some field, it fails when you trying to create new object (ie. by loading fixtures).&lt;/p&gt;

&lt;p&gt;Fix proposition is in attachment.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11196">DC-624</key>
            <summary>Validator_Readonly fails for new objects</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="tomwys">Tomasz Wysocki</reporter>
                        <labels>
                    </labels>
                <created>Fri, 9 Apr 2010 13:52:37 +0000</created>
                <updated>Fri, 9 Apr 2010 13:52:37 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Validators</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="10563" name="Readonly.php" size="1664" author="tomwys" created="Fri, 9 Apr 2010 13:52:37 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-835] Inconsistent record validation on a notnull foreign key when the local relation is set</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-835</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Doctrine_Validator_ForeignKeys_TestCase#testForeignKeyIsValidIfLocalRelationIsSet()&lt;/p&gt;

&lt;p&gt;This test passes fine as is. But it fails if I make the following change:&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-none&quot;&gt;public function testForeignKeyIsValidIfLocalRelationIsSet()
{
    //$person = new TestPerson();
    $address = new TestAddress();
        
    //$address-&amp;gt;Person = $person;    
    $address-&amp;gt;Person-&amp;gt;first_name = &quot;John&quot;;
        
    $table = $address-&amp;gt;getTable();
    $errors = $table-&amp;gt;validateField(&apos;person_id&apos;, $address-&amp;gt;person_id, $address);
        
    $this-&amp;gt;assertEqual(0, $errors-&amp;gt;count());
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The only difference is that instead of explicitly assigning $address-&amp;gt;Person, I&apos;m letting it happen automatically when assigning the first name. What is it about the property chaining when creating the related record that screws up doctrine&apos;s internal reference tracking?&lt;/p&gt;</description>
                <environment></environment>
            <key id="11806">DC-835</key>
            <summary>Inconsistent record validation on a notnull foreign key when the local relation is set</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="adamthehutt">Adam Huttler</reporter>
                        <labels>
                    </labels>
                <created>Thu, 19 Aug 2010 22:33:14 +0000</created>
                <updated>Tue, 24 Aug 2010 22:14:20 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Record</component>
                <component>Relations</component>
                <component>Validators</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14019" author="adamthehutt" created="Thu, 19 Aug 2010 23:20:35 +0000"  >&lt;p&gt;This is an existing test case for which I&apos;ve added two tests. The first one fails, while the second passes. The first one captures the issue I&apos;m experiencing.&lt;/p&gt;</comment>
                    <comment id="14062" author="adamthehutt" created="Tue, 24 Aug 2010 22:14:20 +0000"  >&lt;p&gt;This patch augments the test file with the new test and also makes a change to Doctrine_Related_LocalKey that causes the test to pass.&lt;/p&gt;

&lt;p&gt;Unfortunately, it causes another test to fail: 1072.&lt;/p&gt;

&lt;p&gt;I don&apos;t fully understand test 1072, but it appears to be testing closely related behavior (i.e. relation chaining).&lt;/p&gt;

&lt;p&gt;What do you think?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10748" name="dc-835-patch.txt" size="1601" author="adamthehutt" created="Tue, 24 Aug 2010 22:14:20 +0000" />
                    <attachment id="10746" name="ForeignKeysTestCase.php" size="2549" author="adamthehutt" created="Thu, 19 Aug 2010 23:20:35 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-965] Doctrine is passing timestamps to Doctrine_Validator_Unsigned</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-965</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Since April last year I&apos;ve been unable to use Doctrine Timestampable functionality because I get errors like this:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Uncaught exception &apos;Doctrine_Validator_Exception&apos; with message &apos;Validation failed in class XXX 1 field had validation error: * 1 validator failed on created_at (unsigned) &apos; in ...&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I&apos;ve tried lots of different configurations for the timestampable functionality (see &lt;a href=&quot;http://stackoverflow.com/questions/2594736/doctrine-unsigned-validation-error-storing-created-at&quot; class=&quot;external-link&quot;&gt;my Stack Overflow question&lt;/a&gt; for details) to no avail.&lt;/p&gt;

&lt;p&gt;I&apos;ve done some further investigation and the reason for the problem is that the timestamps are being sent to Doctrine_Validator_Unsigned for validation; they are then failing the following regexp test:&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;if&lt;/span&gt; (preg_match(&apos;/[^0-9\-\.]/&apos;, $value)) {
            &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;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;m not smart enough to figure out why Doctrine is calling an unsigned validation test for these timestamps, so for now I&apos;ve fixed the problem by hacking the following into Doctrine_Validator_Unsigned:&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;if&lt;/span&gt; (preg_match(&apos;/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/&apos;, $value)) {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Very ugly I know, but when I add this in the rest of the timestamping functionality works perfectly. Would love to get to the bottom of this bug - is particularly strange because nobody else seems to be experiencing it.&lt;/p&gt;</description>
                <environment>Debian Lenny (5.0.8) with MySQL (5.0.51a-24+lenny5O). Doctrine hosted within CodeIgniter v1.7.2</environment>
            <key id="12377">DC-965</key>
            <summary>Doctrine is passing timestamps to Doctrine_Validator_Unsigned</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="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="alexatkeplar">Alex Dean</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 Feb 2011 05:15:38 +0000</created>
                <updated>Fri, 11 Feb 2011 05:57:09 +0000</updated>
                                    <version>1.2.2</version>
                <version>1.2.3</version>
                                                <component>Validators</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15250" author="alexatkeplar" created="Fri, 11 Feb 2011 05:57:09 +0000"  >&lt;p&gt;Added CodeIgniter details to environment&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-763] Timestamp validation does not fail, when missing time in value</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-763</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Doctrine_Validator_Timestamp does not validate correctly, when missing time information in value!&lt;/p&gt;

&lt;p&gt;2009-01-20 -&amp;gt; validator returns true, should be false because of the missing time&lt;/p&gt;</description>
                <environment>php 5.2.6 + mysql 5.0</environment>
            <key id="11547">DC-763</key>
            <summary>Timestamp validation does not fail, when missing time in value</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="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="sigma">Steffen Zeidler</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 Jun 2010 10:11:14 +0000</created>
                <updated>Tue, 31 Aug 2010 15:37:05 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Validators</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="14201" author="sigma" created="Tue, 31 Aug 2010 15:37:05 +0000"  >&lt;p&gt;patch &amp;amp; test&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10760" name="DC763TestCase.php" size="1657" author="sigma" created="Tue, 31 Aug 2010 15:37:05 +0000" />
                    <attachment id="10761" name="Timestamp.patch" size="479" author="sigma" created="Tue, 31 Aug 2010 15:37:05 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-732] &quot;charset&quot; and &quot;collation&quot; column options cause seeking for a validator</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-732</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;If a record has a column defined with &lt;tt&gt;&apos;charset&apos;&lt;/tt&gt; and/or &lt;tt&gt;&apos;collation&apos;&lt;/tt&gt; in its options, calling &lt;tt&gt;$record-&amp;gt;save()&lt;/tt&gt; triggers exception&lt;br/&gt;
&lt;tt&gt;PHP Fatal error:  Uncaught exception &apos;Doctrine_Exception&apos; with message &apos;Validator named &apos;charset&apos; not available.&apos; in /&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;/lib/vendor/doctrine/Doctrine/Validator.php:56&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Fix is trivial, see attached patch &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;p&gt;Thank you&lt;/p&gt;</description>
                <environment>Doctrine SVN 1.2 r.7676</environment>
            <key id="11486">DC-732</key>
            <summary>&quot;charset&quot; and &quot;collation&quot; column options cause seeking for a validator</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="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="gx">Guilliam X</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Jun 2010 06:23:43 +0000</created>
                <updated>Tue, 15 Jun 2010 07:17:10 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Validators</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13311" author="gx" created="Mon, 14 Jun 2010 16:21:50 +0000"  >&lt;p&gt;&lt;sub&gt;oops I had mis-clicked priority to max instead of minor...&lt;/sub&gt;&lt;/p&gt;</comment>
                    <comment id="13326" author="gx" created="Tue, 15 Jun 2010 07:17:04 +0000"  >&lt;p&gt;Edited the patch with &quot;branches/1.2&quot; as root&lt;/p&gt;

&lt;p&gt;I don&apos;t provide a test case but they all run without failure after patching &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>
                </comments>
                    <attachments>
                    <attachment id="10651" name="DC-732.patch" size="641" author="gx" created="Tue, 15 Jun 2010 07:17:04 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>