Forums / Developer / HOWTO?: Fill db field with "NULL"
Björn Dieding@xrow.de
Thursday 30 June 2005 4:16:45 am
Hi,I am trying to fill a certain field of a persistent object with "NULL" but it does not work out... How can I do this. Filling the field with a "0" value works fine.
From func definition
"expires" => array( 'name' => "Expires", 'datatype' => 'integer', 'default' => null, 'required' => false ) )
Code that does not work for me to insert null data in db...
$mypersistentobject = new mypersistentobject( $row ) $mypersistentobject->setAttribute( 'expires', null ); $mypersistentobject->store();
thx
Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs Looking for hosting? http://hostingezpublish.com ----------------------------------------------------------------------------- GMT +01:00 Hannover, Germany Web: http://www.xrow.com/
Thursday 07 July 2005 3:26:38 am
Nobody?
Bruce Morrison
Thursday 07 July 2005 5:17:20 am
Hi Björn
I've had a brief look at the storeObject() function of the eZPersistentObject class and it does not appear possible to achieve what you want without patching the eZPersistentObject class or overriding the storeObject() function in your class.
CheersBruce
My Blog: http://www.stuffandcontent.com/ Follow me on twitter: http://twitter.com/brucemorrison Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish