This is not a bug, it's a feature ;) The fact that the index values
were were being serialized was actually not consistant with our other
annotated fields, so I made the decision to bring it in line and not
do so.

I actually highlighted the change in the CHANGELOG:

af12b6c - The default JSONConverter now supports multiple values via a
@RiakIndex annotated Set<> (Integer or String). Note this also brings
serialization/deserialization in line with our other annotaded fields
in that these values will not be present in the resulting JSON. To
override this behavior the Jackson @JsonProperty annotation can be
supplied

Thanks,
Brian Roach

On Tue, Sep 25, 2012 at 1:01 AM, Deepak Balasubramanyam
<[email protected]> wrote:
> I switched to the java riak-client 1.0.6 to take it for a spin, and several
> test cases of mine failed. Upon further investigation I found that any
> member variable that contains the @RiakIndex annotation does not serialize
> into Riak anymore. You can reproduce the problem with the following type
>
> @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
> public class MyType
> {
>     public static final String SOME_NAME_STR_REFERENCE = "blah";
>     @RiakKey
>     private String myKey;
>     @RiakIndex(name=SOME_NAME_STR_REFERENCE)
>     private String indexedProp;
> // Getters and setters go here
> }
>
> Make a call to bucket.store(typeRef).execute() followed by a GET to
> /riak/myBucket/myKey. The indexedProp element will be missing in the json
> for calls made on riak-client version 1.0.6 but will be available when the
> call is made from riak-client version 1.0.5.
>
> Thanks
> Deepak Bala
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to