Doctrine 1
  1. Doctrine 1
  2. DC-671

Record could be saved, even tough a NotNull column is null

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Invalid
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.2.3
    • Component/s: Validators
    • Labels:
      None
    • Environment:
      OS X 10.6.3 - php 5.3.1

      Description

      Strange behavior: The record could be saved without getting validation exception even tough a NotNull column is empty.

      If you use Sqlite as mock driver you get validation exception. Test case is added into ticket!

        Activity

        Hide
        Fabian Spillner added a comment -

        there the test case (About filename: I wonder why there is same file (empty test) on the doctrine ticket tests - please rename this test case if I call it wrong)

        Show
        Fabian Spillner added a comment - there the test case (About filename: I wonder why there is same file (empty test) on the doctrine ticket tests - please rename this test case if I call it wrong)
        Hide
        Jonathan H. Wage added a comment -

        Do you have validation enabled? It is off by default.

        Show
        Jonathan H. Wage added a comment - Do you have validation enabled? It is off by default.
        Hide
        Fabian Spillner added a comment -

        Ah! It works now! Thank you! It's new default behavior since 1.2?

        Show
        Fabian Spillner added a comment - Ah! It works now! Thank you! It's new default behavior since 1.2?
        Hide
        Fabian Spillner added a comment -

        I forget to enable the attribute Doctrine_Core::ATTR_VALIDATE.

        Show
        Fabian Spillner added a comment - I forget to enable the attribute Doctrine_Core::ATTR_VALIDATE.
        Hide
        Jonathan H. Wage added a comment -

        No it has always been off by default.

        Show
        Jonathan H. Wage added a comment - No it has always been off by default.
        Show
        Fabian Spillner added a comment - The reason of my confusion: On Symfony 1.2 the validation is enabled by default: http://trac.symfony-project.org/browser/branches/1.2/lib/plugins/sfDoctrinePlugin/config/config.php And nothing is talked about it: http://www.symfony-project.org/tutorial/1_4/en/whats-new#chapter_a2fae23c9403b0e9ec99806fccf6b53e_doctrine_integration

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Fabian Spillner
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: