Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2243

Inconsistent PHP Type for "bigint" columns

    Details

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

      Description

      It seems like columns of type "bigint" have no consistent PHP type.

      If an object is read from the database, the database value seems to be cast to
      a PHP string. However, directly after persisting an entity using an id generation strategy of "AUTO" the type is a PHP integer.

      I think it would make sense to use a PHP string for both cases as you otherwise can run into problems if you use shallow comparisons such as "===".

        Activity

        Johannes Schmitt created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Benjamin Eberlei made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 2.3.3 [ 10329 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Johannes Schmitt
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: