don't record null key values
darcs-hash:20080926164021-5ed1f-833db670e260c68fc02b0a2a60a2829f247742a1.gz
This commit is contained in:
parent
f01f006615
commit
98add9803b
|
@ -112,10 +112,13 @@ class Memcached_DataObject extends DB_DataObject
|
|||
if ($type == 'K') {
|
||||
$primary[] = $key;
|
||||
} else {
|
||||
$c->set($this->cacheKey($this->tableName(), $key, $this->$key),
|
||||
$v = $this->$key;
|
||||
if (!is_null($v)) {
|
||||
$c->set($this->cacheKey($this->tableName(), $key, $v),
|
||||
$this);
|
||||
}
|
||||
}
|
||||
}
|
||||
# XXX: figure out what to do with compound pkeys
|
||||
if (count($primary) == 1) {
|
||||
$key = $primary[0];
|
||||
|
|
Loading…
Reference in New Issue
Block a user