Doesn't work "keep" option
Closed this issue · 1 comments
$client = new Ext_Riak();
$bucket = $client->bucket("test");
$bucket->newObject("foo1", 111)->store();
$bucket->newObject("foo2", 222)->store();
$bucket->newObject("foo3", 333)->store();
$bucket->newObject("foo4", 444)->store();
$foo1 = $bucket->get('foo1');
$foo2 = $bucket->get('foo2');
$foo3 = $bucket->get('foo3');
$foo4 = $bucket->get('foo4');
$foo1->addLink($foo2)->store();
$foo2->addLink($foo3)->store();
$foo2->addLink($foo4)->store();
$object = $bucket->get('foo1')
->link('', '', true)
->link('', '', true)
->map("Riak.mapValues")
->run();
print_r($object);
OUTPUT:
(
[0] => Array
(
[0] => Array
(
[0] => test
[1] => foo2
[2] => test
)
)
[1] => Array
(
[0] => Array
(
[0] => test
[1] => foo3
[2] => test
)
[1] => Array
(
[0] => test
[1] => foo4
[2] => test
)
)
)
I can't get a values of objects.
mapValues may not work on phases such as link which return links rather than values.
Suggest mapping values separately.