Doctrine 1
  1. Doctrine 1
  2. DC-66

Saving "new Doctrine_Expression('NOW()')" to database doesn't work since r6403

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.2.0-ALPHA2
    • Fix Version/s: 1.2.0-ALPHA2
    • Component/s: Record
    • Labels:
      None
    • Environment:
      MySQL 5.0.51, PHP 5.3

      Description

      Doctrine_Record:1469

      } else if ($type == 'timestamp' || $type == 'date') {
      return strtotime($old) !== strtotime($new);

      These new lines cause inability to save NOW() to "date" field.

      Change was commited in r6403 branch 1.2

      MySQL error is:

      SQLSTATE[HY000]: General error: 1364 Field 'date' doesn't have a default value

        Activity

        Hide
        Lex Brugman added a comment - - edited

        Possible fix attached.

        Show
        Lex Brugman added a comment - - edited Possible fix attached.
        Hide
        Marcin Gil added a comment -

        The patch is effective, please apply to SVN.

        Thanks!

        Show
        Marcin Gil added a comment - The patch is effective, please apply to SVN. Thanks!
        Hide
        Johannes Weber added a comment -

        I don't want to rewrite all my "NOW()" values! Please fix this ASAP!
        thx!

        Show
        Johannes Weber added a comment - I don't want to rewrite all my "NOW()" values! Please fix this ASAP! thx!

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Marcin Gil
          • Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: