Specify type field

This commit is contained in:
Thomas Bruederli 2013-10-04 19:38:44 +02:00
parent b7d4731d97
commit af5115d0c3
2 changed files with 25 additions and 1 deletions

View file

@ -24,5 +24,17 @@
class kolab_storage_cache_configuration extends kolab_storage_cache
{
protected $extra_cols = array('type');
/**
* Helper method to convert the given Kolab object into a dataset to be written to cache
*
* @override
*/
protected function _serialize($object)
{
$sql_data = parent::_serialize($object);
$sql_data['type'] = $object['type'];
return $sql_data;
}
}

View file

@ -25,4 +25,16 @@ class kolab_storage_cache_contact extends kolab_storage_cache
{
protected $extra_cols = array('type');
/**
* Helper method to convert the given Kolab object into a dataset to be written to cache
*
* @override
*/
protected function _serialize($object)
{
$sql_data = parent::_serialize($object);
$sql_data['type'] = $object['_type'];
return $sql_data;
}
}