Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-118

DateTime maps to TIMESTAMP for MySQL, breaks "nullable"

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-ALPHA3
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      For the DateType type, "\Doctrine\DBAL\Platforms\MySqlPlatform::getDateTimeTypeDeclarationSql" returns "TIMESTAMP" in some cases, which leads to MySQL not allowing NULL values in DateTime fields. This breaks some models (where dates don't need to be set)... Why was that changed?

        Activity

        Hide
        Benjamin Eberlei added a comment -

        My mistake, in introduced this regression. I'll add a test and fix it.

        Show
        Benjamin Eberlei added a comment - My mistake, in introduced this regression. I'll add a test and fix it.
        Hide
        Benjamin Eberlei added a comment -

        Fixed!

        Show
        Benjamin Eberlei added a comment - Fixed!

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Nico Kaiser
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: