Ticket #1305 (closed defect: fixed)
notnull not using default
| Reported by: | turnbullm | Owned by: | jwage |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Attributes | Version: | 0.11.0 |
| Severity: | Keywords: | ||
| Cc: | Has Test: | no | |
| Status: | Pending Core Response | Has Patch: | no |
Description
If I setup a model 'Testing' with a column like so:
$this->hasColumn('test', 'string', 255, array(
'notnull' => true, 'default' => 'test',
));
Then do this..
$testing = new Testing(); $testingtest? = null; $testing->save();
Should not doctrine be smart enough to detect that its null, and set it to 'test'?
Because at the moment it doesn't, and then the mysql database complains with this: Column 'test' cannot be null
Change History
Note: See
TracTickets for help on using
tickets.