Friday, August 27, 2010

Bool: why is NULL "nothing"? Should I set a default of 0 instead of NULL?

Hi all

I just noticed that when a boolean's database field is set to NULL,
it's neither true nor false. Is this really true?

Should I disallow NULL and set it to a 0 by default? Or is there a way
to tell CakePHP to treat NULL as false?

Thanks
Josh

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: