Thank's, works fine, but...
There's an reverse for DB_DataObject_Cast ?
I need to do this:
$do->field = DB_DataObject_Cast::sql('null');
$do->update or insert
...
echo $do->field; // give me Object, I want null like if($do->field == null){ ...
maybe using an overload getField but what I should write on it?
or any other idea!?
At 09:22 20/12/2003 +0800, you wrote:
use
$do->field = 'null';
or
// for any raw sql.
$do->field = DB_DataObject_Cast::sql('null');
null as a native value in PHP doesnt really exist, - it's very close unset(), and very difficult to test for reliably..
Regards
Alan
Marcos Neves wrote:
I'm not able to insert or update NULL values to database using DB_DataObject.
any idea? or a bug?