Details
Description
Once the upgrade was done from Doctrine 1.2.1 to 1.2.2 we discovered that date related issues started to appear.
With dates that are persisted in DB as NULL are translated to "0000-00-00" when retrieved from DB. This has occurred in multiple places and is quite worrying as there is a lot of dates in our project. This means that everywhere in our codebase where we check a datevalue in our Models is NULL we need also to check for the string literal "0000-00-00".
With 1.2.3 this works for me fine with both TIMESTAMP and DATE fields.
YAML date_of_birth: type: date BASE MODEL $this->hasColumn('date_of_birth', 'date', null, array( 'type' => 'date', // try these two // 'notnull' => false, // 'default' => null ));YAML exported_at: type: timestamp(25) notnull: false default: null # in this model I have everything to make sure it accepts and defaults to NULL BASE MODEL $this->hasColumn('exported_at', 'timestamp', 25, array( 'type' => 'timestamp', 'notnull' => false, 'length' => '25', ));You may try adding these to your YAML and (base) models
YAML fieldname: . . . notnull: false default: null BASE MODEL $this->hasColumn('fieldname', . . . . . . 'notnull' => false, // <<<<<<< // 'default' => null, // <<< maybe, probably not needed ));I hope it helps.