i knew it^^
On 29 Okt., 13:58, Caroline <cdotc...@xxxxxxxxx> wrote:
> ok, I am an idiot...
> After hours of debugging, I found the code where I, myself, unset the
> field if it is empty.
> Sorry about the waste of time and thanks for the help.
> On Oct 29, 9:05 pm, euromark <dereurom...@xxxxxxxxxxxxxx> wrote:
> > i still dont get why $object['Taxcode']['description'] = '' should be
> > ignored
> > in my case it always sets the field toemptyin the database
> > what you are doing is exactly what happens if you use edit andemptya
> > field.
> > sure there is no callback, no whitelisting involved?
> > On 29 Okt., 04:27, Caroline <cdotc...@xxxxxxxxx> wrote:
> > > Thanks for that, unfortunately, not luck with allowEmpty.
> > > I am going to report a bug and see what happens.
> > > On Oct 29, 11:40 am, cricket <zijn.digi...@xxxxxxxxx> wrote:
> > > > On Thu, Oct 28, 2010 at 8:41 PM, Caroline <cdotc...@xxxxxxxxx> wrote:
> > > > > sorry, not sure I follow. How?
> > > > > Because if the field is blank, Cake does notinsertNULL, 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
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at