How to retrieve generated id in java client

ricardo.ekm ricardo.ekm at
Thu Sep 25 04:39:18 EDT 2014

When saving a object with null key using riak's java client is it possible
to retrieve the generated id? 

I've found how to achieve this saving a string
+        Bucket b = client.fetchBucket(bucketName).execute();
+        IRiakObject o =,
+        String k = o.getKey();
+        assertNotNull(k);

However couldn't figure out how to do this a custom object
+ MyClass execute =;
+ ??

Any help is appreciated. Thanks!

View this message in context:
Sent from the Riak Users mailing list archive at

More information about the riak-users mailing list