On Thu, Oct 28, 2010 at 8:41 PM, Caroline <[email protected]> wrote: > sorry, not sure I follow. How? > Because if the field is blank, Cake does not insert NULL, it just > ignore the field.
My bad. I forgot we were talking about an update. So, if the column was defined to be DEFAULT NULL, and the user deletes the description form element's content, you'd want the field to be updated to NULL. I think you can achieve that by having the validation rule 'allowEmpty' = true. > I would have to explicitly write > If ($data['Taxcode']['description']=='') $data['Taxcode'] > ['description'] = null; > before calling the save method. > I know I can use beforeSave and other workarounds, but I just wanted > to make sure I was not doing something wrong :P Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
