How DataObjects Handles Nulls on Insert

From: Date: Thu, 17 Apr 2003 18:31:37 +0000
Subject: How DataObjects Handles Nulls on Insert
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4931@lists.php.net to get a copy of this message
I am using DataObjects 0.17 and I have some fields which are numeric. I have a form for adding a new record and a handler which creates the desired DataObject and uses setFrom($_POST). It then does an insert on the object. I have noticed that if I do not specify a value for the numeric fields, they are inserted as 0, when in fact, I would like them inserted as NULL (since this is different to me). Does DO have this capability? If not, is it something that can be added? Is this also the same behaviour for strings, with "" being inserted (I have not checked)? Is there a work-around?

« previous php.pear.general (#4931) next »