Marcus
Well-known member
My datawriter stores NULL always as 0.
The value should be an integer value, but also capable of being just NULL. This is my datawriter:
PHP:
$var=NULL;
$dwData = array('user_id' => $userId, 'var' => $var);
);
$dw = XenForo_DataWriter::create('MyDatawriter_Location');
$dw->bulkSet($dwData);
$dw->save();
PHP:
protected function _getFields()
{
return array(
'abc' => array(
'this_id' => array('type' => self::TYPE_UINT, 'autoIncrement' => true),
'user_id' => array('type' => self::TYPE_UINT, 'required' => true),
'var' => array('type' => self::TYPE_UINT, 'default' => NULL),
)
);
}