Im using the symfony framework with mysql.
I have a field in mysql that is generated by doctrine as:
weight: { type: double, notnull: false, default: NULL }
`weight` double(18,2) NULL DEFAULT NULL
The value is entered using a textbox and the generated sql trys to insert '' into this field if no value is given.
This produces the following error:
SQLSTATE[01000]: Warning: 1265 Data truncated for column 'weight' at row 1
- How would change this value such that a Doctrine_Null gets used instead?
- Also how would i be able to retrieve '(unknown)' for display purposes if the field is null?
Thanks