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: In Progress
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • 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()

        Activity

          People

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

            Dates

            • Created:
              Updated: