Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-63

missing time and date SQL declaration for all platforms

    Details

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

      Description

      The following SQL deleration functions are missing / incomplete within all Platform classes:

      public function getDateTypeDeclarationSql(array $fieldDeclaration)
      public function getTimeTypeDeclarationSql(array $fieldDeclaration)
      

      This leads to fatal errors when using time column definitions with e.g. a mysql backend:
      PHP Fatal error: Call to undefined method Doctrine\DBAL\Platforms\MySqlPlatform::getTimeTypeDeclarationSql() .../doctrine/lib/Doctrine/DBAL/Types/TimeType.php

      Patch attached (I've used the oracle and mssql declarations from doctrine 1.x, "DATE' was used for both oracle 'date' and 'time'c olumns...).
      Also, the function getTimeTypeDeclarationSql() was completely missing in AbstractPlatform.

        Activity

        Hide
        Roman S. Borschel added a comment -

        Is this a patch against HEAD? I'm asking because at least getDateTypeDeclarationSql seems to be present and functional in the latest code. getTimeTypeDeclarationSql seems to be missing indeed. Sorry for that. Will be scheduled for the soon to come alpha3 release.

        Show
        Roman S. Borschel added a comment - Is this a patch against HEAD? I'm asking because at least getDateTypeDeclarationSql seems to be present and functional in the latest code. getTimeTypeDeclarationSql seems to be missing indeed. Sorry for that. Will be scheduled for the soon to come alpha3 release.
        Hide
        Christian Ehmig added a comment -

        Sorry, maybe I had to be more precise:

        • getTimeTypeDeclarationSql is missing for any platform
        • both are missing for oracle and mssql

        (that's what I've included in the patch)

        Anyway: No need for you to be sorry You're doing an awesome job with doctrine and I appreciate it a lot.

        Show
        Christian Ehmig added a comment - Sorry, maybe I had to be more precise: getTimeTypeDeclarationSql is missing for any platform both are missing for oracle and mssql (that's what I've included in the patch) Anyway: No need for you to be sorry You're doing an awesome job with doctrine and I appreciate it a lot.
        Hide
        Benjamin Eberlei added a comment -

        Applied and fixed, thanks for the patch.

        Show
        Benjamin Eberlei added a comment - Applied and fixed, thanks for the patch.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Christian Ehmig
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: