How to retrieve generated id in java client
roach at basho.com
Thu Sep 25 09:51:33 EDT 2014
When using your own class you'll need to add a String field to it and
annotate it with @RIakKey. When the response comes back from Riak the
client will inject the generated key into that field.
On Thu, Sep 25, 2014 at 2:39 AM, ricardo.ekm <ricardo.ekm at gmail.com> wrote:
> 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 = b.store(null,
> + 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: http://riak-users.197444.n3.nabble.com/How-to-retrieve-generated-id-in-java-client-tp4031828.html
> Sent from the Riak Users mailing list archive at Nabble.com.
> riak-users mailing list
> riak-users at lists.basho.com
More information about the riak-users