Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2658

Inserting NULL for Undefined Variables

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3.1
    • Fix Version/s: None
    • Component/s: ORM
    • Labels:
    • Environment:
      CentOS Linux, VMware, MySQL

      Description

      When a MySQL schema contains a line like this:
      `failedattempts` int(11) NOT NULL DEFAULT '0',

      If a new entity is created and the failedattempts variable is never set, Doctrine attempts to insert the value NULL which throws an SQL error. If a value is undefined for a new object, shouldn't it just be excluded from the insert fields?

        Activity

          People

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

            Dates

            • Created:
              Updated: