Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-423

Type GUID = VARCHAR(255) on platforms that don't have a native GUID support

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Labels:
      None

      Description

      I'm using MySQL with entities that have GUID ids. Therefore I'm using @ORM\Column(type="guid") for the ORM mapping. As MySQL does not have a native GUID data type, it gets mapped to type="string" with a default length of 255 -> VARCHAR(255). I don't really understand why we don't limit the length to 36, which is the fixed length for GUIDs. You could even think about using CHAR(36) for MySQL.

      -> see Doctrine\DBAL\Platforms\AbstractPlatform -> getGuidTypeDeclarationSQL()

        Issue Links

          Activity

          amr created issue -
          Steve Müller made changes -
          Field Original Value New Value
          Assignee Benjamin Eberlei [ beberlei ] Steve Müller [ deeky666 ]
          Steve Müller made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Marco Pivetta made changes -
          Link This issue depends on DBAL-731 [ DBAL-731 ]
          Marco Pivetta made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 2.5 [ 10523 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Steve Müller
              Reporter:
              amr
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: