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') {
|
if ($type == 'K') {
|
||||||
$primary[] = $key;
|
$primary[] = $key;
|
||||||
} else {
|
} 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);
|
$this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
# XXX: figure out what to do with compound pkeys
|
# XXX: figure out what to do with compound pkeys
|
||||||
if (count($primary) == 1) {
|
if (count($primary) == 1) {
|
||||||
$key = $primary[0];
|
$key = $primary[0];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user