Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-571

IntegerType - NULL in datbase should be NULL not 0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA1
    • Fix Version/s: 2.0-BETA2
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:
      PostgreSQL 8.4.3, Ubuntu 10.04

      Description

      I think that IntegerType::convertToPHPValue() should return NULL if we have NULL value in database. So insted

      return (int) $value;

      there will be

      return is_null($value) ? NULL : (int) $value;

      Or there could be even some sophisticated checking if column is nullable.

        Activity

        Hide
        Christian Heinrich added a comment -

        I've fixed this and pushed it into http://github.com/Shurakai/doctrine2

        Therefore, Roman might pull it back into the repo.

        Show
        Christian Heinrich added a comment - I've fixed this and pushed it into http://github.com/Shurakai/doctrine2 Therefore, Roman might pull it back into the repo.
        Hide
        Roman S. Borschel added a comment -

        @Christian: Thanks.

        Show
        Roman S. Borschel added a comment - @Christian: Thanks.

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Václav Novotný
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: