@RiakIndex annotated field is not stored as part of value

Christopher Meiklejohn cmeiklejohn at basho.com
Mon Jan 26 11:59:42 EST 2015


> On Jan 26, 2015, at 5:48 PM, Santi Kumar <santi at veradocs.com> wrote:
> 
> Yes. I'm using POJO and annotating one of the field with RiakIndex. When I'm reading the object with the key, as the tag field is not part of the object, while writing I dont have the tag value while writing the object.
> 
> Class Foo {
> 
> private String fooId;
> 
> @RiakIndex(name="barid")
> 
> private String barid;
> 
> .....
> 
> }
> 
> When I'm storing the object, I set the barid for the object and storing the object. Annotation is taking care of tagging the object with barid.
> 
> When I query the object with barId, I have the barId value so I'm setting barId to object and writing it. But If I lookup the object with fooId, as barId value is not part of the object I cant tag the object with barid. SO when I'm writing the object I'm losing the association .
> 
> So Is there any thing I'm missing to make it part of the object state. That way as you said, When I read-modify-write, the tag value exist all the time.
> 
> 

Hi Santi,

I’m having trouble following your exact issue.  Is it possible for you to share the problematic code so we can try to reproduce it here?

Thanks,
Chris

Christopher Meiklejohn
Senior Software Engineer
Basho Technologies, Inc.
cmeiklejohn at basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20150126/a6842b0d/attachment-0002.html>


More information about the riak-users mailing list